alphabetic static method
Validates only letters
Implementation
static String? Function(String?) alphabetic({String? message}) {
return (String? value) {
if (value == null || value.trim().isEmpty) {
return null;
}
if (!RegExp(r'^[a-zA-Z\s]+$').hasMatch(value)) {
return message ?? _defaultMessages['alphabetic'];
}
return null;
};
}