validate method
Validates the given value
and returns an error message if the value is invalid.
Implementation
@override
String? validate(String? value) {
if (value != null) {
if (value.trim().isEmpty) {
return getErrorMessage(EasyValidatorMessages.instance.required);
}
}
return null;
}