ReqDigit class

Convenient validator for required, digit-only fields.

It is the composition between the Req and Digit validators.

Constructors

ReqDigit({String? blank, String? mal})
Constrains the input data to the digits 0-9.
ReqDigit.len(int len, {String? blank, String? mal, String? diff})
Constrains the input data to the digits 0-9 and its length (number of digits) to len digits.
ReqDigit.max(int max, {String? blank, String? mal, String? long})
Constrains the input data to the digits 0-9 and its length (number of digits) to a maximum of max digits.
ReqDigit.min(int min, {String? blank, String? mal, String? short})
Constrains the input data to the digits 0-9 and its length (number of digits) to a minimum of min digits.
ReqDigit.range(int min, int max, {String? blank, String? mal, String? short, String? long})
Constrains the input data to the digits 0-9 and its length (number of digits) within the range min–max.

Properties

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(String? digits) String?
Valid - returns null - if digits has only digits or is null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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