getTextValidator static method
FormFieldValidator<String>
getTextValidator(
- String error_text,
- FormFieldValidator<
String> ? validator
Implementation
static FormFieldValidator<String> getTextValidator(String error_text, FormFieldValidator<String>? validator) {
//check found
if ( validator != null ) {
return validator;
}
//default
return ( textValidator) {
if ( textValidator == null || textValidator.isEmpty) {
return error_text;
}
return null;
};
}