Validator class abstract
Abstract class for input validation
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isValid → bool
-
Return the state of the validator
after the most recent validation.
no setter
- longErrorMessage → String?
-
Return a long error message
if the input is invalid
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortErrorMessage → String?
-
Return a short error message
if the input is invalid
no setter
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(
BuildContext context, String fieldName, String? value) → String? - Function to validate the form input. It takes a string and returns an String error message if the input is invalid or null if the input is valid.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited