notBlank<T> static method
when valid
- value is null
- value's length(after trim) > 0
Implementation
static FormeValidator<T> notBlank<T>({String errorText = ''}) {
return (f, T v) {
if (v == null) {
return null;
}
return (v as String).trim().isNotEmpty ? null : errorText;
};
}