notEmpty<T> static method
when valid
- value is null
- value's length > 0
Implementation
static FormeValidator<T> notEmpty<T>({String errorText = ''}) {
return (f, T v) {
if (v == null) {
return errorText;
}
if (_getLength(v) == 0) {
return errorText;
}
return null;
};
}