ValidatorRule class abstract
An abstract class representing a validation rule.
- Implementers
Constructors
- ValidatorRule({String? errorMessage})
-
Constructs a ValidatorRule with an optional error message.
const
Properties
-
defaultMessage
→ Map<
String, String> -
A map of default error messages for the validation rule.
final
- errorMessage → String?
-
The error message to be displayed if validation fails.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isValid(
BuildContext context, String? value) → String? -
Validates the given
valuein the providedcontext. -
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