validator property
validators for this field.
Defaults to _NumberInputWithIncrementDecrementState._defaultValidator
validator
based on the values of min and max field.
Note: These values default to 0
and double.infinity respectively.
String _minMaxValidator(String value) {
return num.parse(value) < widget.min || num.parse(value) > widget.max
? 'Value should be between ${widget.min} and ${widget.max}'
: null;
}
Implementation
final FormFieldValidator<String>? validator;