NumberValidator class

Validator that validates if control's value is a numeric value.

Inheritance

Constructors

NumberValidator({int allowedDecimals = 0, bool allowNegatives = true})
Creates a new NumberValidator instance to validate strings representing numbers.
const

Properties

allowedDecimals int
The allowed number of decimal places in the validated string.
final
allowNegatives bool
Whether the validator allows negative numbers.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(AbstractControl control) Map<String, dynamic>?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(AbstractControl control) Map<String, dynamic>?
Validates the control.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

notNumbersRegex RegExp
The regex expression of a numeric string value.
final