alphabetic static method
Validates that the input contains only alphabetic characters.
Implementation
static String? alphabetic(String? value, {String fieldName = 'This field'}) {
if (value == null || value.isEmpty) return '$fieldName is required';
if (!RegExp(r'^[a-zA-Z\s]+$').hasMatch(value)) {
return '$fieldName can only contain letters and spaces';
}
return null;
}