validateName static method
Validator for the first name and last name form fields
Implementation
static String? validateName(String? value, int pos) {
if (value == null || value.isEmpty) {
return 'Please enter a valid ${pos == 1 ? 'first' : 'last'} name';
}
return null;
}