BetweenRule class
A rule that validates if a value is between a specified range.
- Inheritance
-
- Object
- ValidatorRule
- BetweenRule
Constructors
- BetweenRule(num min, num max, {String? errorMessage})
-
Creates a BetweenRule with the specified
minandmaxvalues.const
Properties
-
defaultMessage
→ Map<
String, String> -
Provides default error messages in various languages.
no setteroverride
- errorMessage → String?
-
The error message to be displayed if validation fails.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- max → num
-
The maximum value of the range.
final
- min → num
-
The minimum value of the range.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isValid(
BuildContext context, String? value) → String? -
Validates if the
valueis between min and max.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