integer static method
Implementation
static Map<String, String>? integer(AbstractControl control) {
if (Validators.required(control) != null) {
return null;
} else if (control.value == null) {
return null;
} else if (control.value is int) {
return null;
} else {
try {
int.parse(control.value as String);
} on FormatException {
return {
'error': Intl.message('Enter integer values only',
name: 'fo_validator_error_integer')
};
}
return null;
}
}