positiveOrZero<T> static method
when valid
- value is null
- value >= 0
Implementation
static FormeValidator<T> positiveOrZero<T>({String errorText = ''}) {
return (f, T v) {
if (v == null) {
return null;
}
return v as num >= 0 ? null : errorText;
};
}