ReqNum class

Convenient validator for required, numeric fields.

Examples:

  • valid input: "1", "123", "-1", "-9.99"
  • invalid input: "A", "12A", "12.A3"

Constructors

ReqNum({String? blank, String? mal})
Constrains data to numeric values.
ReqNum.max(num max, {String? blank, String? mal, String? large})
Constrains data to numeric values that are less than or equal to max.
ReqNum.min(num min, {String? blank, String? mal, String? small})
Constrains data to numeric values greater than or equal to min.
ReqNum.neg({String? blank, String? mal, String? pos})
Constrains data to negative numbers (zero excluded).
ReqNum.pos({String? blank, String? mal, String? neg})
Constrains data to positive numbers (zero included).
ReqNum.range(num min, num max, {String? blank, String? mal, String? small, String? large})
Constrains data to numeric values 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? input) String?
Valid — returns null – if input is either numeric or 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