required static method
Validates if the field is empty
Implementation
static String? Function(String?) required({String? message}) {
return (String? value) {
if (value == null || value.trim().isEmpty) {
return message ?? _defaultMessages['required'];
}
return null;
};
}