NumberRangeRule class
Validates that a field's value is within a specified numeric range.
- Implemented types
- Annotations
Constructors
- NumberRangeRule.new({required num min, required num max, String? message})
-
Creates a number range validation rule.
min
is the optional minimum value.max
is the optional maximum value.message
is the optional error message. At least one ofmin
ormax
must be provided.const
Properties
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(
String? value, {BuildContext? context}) → String? -
Validates the given
value
. Returns an error message String if validation fails, otherwise returns `null].override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited