ReqDigit class
Convenient validator for required, digit-only fields.
Constructors
- ReqDigit.new({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) tolen
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 ofmax
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 ofmin
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 rangemin–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