NotInListRule class
A rule that checks if a value is not in a specified list of values.
- Inheritance
-
- Object
- ValidatorRule
- NotInListRule
Constructors
-
NotInListRule(List<
String> values, {String? errorMessage}) -
Creates a NotInListRule with the given list of
valuesand an optionalerrorMessage.const
Properties
-
defaultMessage
→ Map<
String, String> -
The default error messages for different locales.
no setteroverride
- errorMessage → String?
-
The error message to be displayed if validation fails.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ List<
String> -
The list of values that the input should not be in.
final
Methods
-
isValid(
BuildContext context, String? value) → String? -
Validates if the
valueis not in the list of values.override -
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