ValidatorAsync class
Check value by a async function, skip check null already
Constructors
-
ValidatorAsync([Future<
bool> valid(dynamic value)?]) - Create Validator can check value by a async function valid
Properties
- condition ↔ (bool Function()?)
-
Used to do some check context before run validate.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message ↔ String?
-
Message used return when validate need return invalid state
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
valid
↔ (Future<
bool> Function(dynamic value)?) -
Function used to check value.
Return 'true' if value is valid, else 'false'
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
dynamic value) → FutureOr< String?> -
Do check
value
, return text ifvalue
is invalid, otherwise is nullinherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultMessage ↔ String
-
Default invalid message
it will be used if message doesn't has value
getter/setter pair