isFile static method
check field is a file not a file => false if added supported extension in validation, check with extension return true
Implementation
static bool isFile(Map<String, dynamic> data, dynamic value, String args) {
if (value is! RequestFile) {
return false;
}
if (args.toString().isEmpty) {
return true;
}
List<String> extensions = args.toString().split(',');
if (extensions.contains(value.extension)) {
return true;
}
return false;
}