ReqInt class

Convenient validator for required, integer fields.

Examples:

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

Constructors

ReqInt({String? blank, String? mal})
Constrains data to integer numbers.
ReqInt.max(int max, {String? blank, String? mal, String? large})
Constrains data to integer numbers that are less than or equal to max.
ReqInt.min(int min, {String? blank, String? mal, String? small})
Constrains data to integer numbers greater than or equal to min.
ReqInt.neg({String? blank, String? mal, String? pos})
Constrains data to negative integer numbers (zero excluded).
ReqInt.pos({String? blank, String? mal, String? neg})
Constrains data to positive integer numbers (zero included).
ReqInt.range(int min, int max, {String? blank, String? mal, String? small, String? large})
Constrains data to integer numbers 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 interic 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