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