validateName static method
Implementation
static String? validateName(String? value) {
if (value == null || value.isEmpty) {
return 'Name is required';
} else if (value.length < 3) {
return 'Name must be at least 3 characters';
}
return null;
}