Between class

A validation rule for checking if a numeric value falls within a specified range.

The Between class is a concrete implementation of the FormifyRule abstract class. It is used to validate whether a numeric value falls within a specified range defined by a minimum and maximum value (inclusive).

This rule checks if the input value is a valid numeric representation and whether it falls within the specified range [min, max]. If the value is outside the range or not a valid number, an error message is generated.

Inheritance

Constructors

Between(num min, num max)
Creates an instance of the Between validation rule.

Properties

hashCode int
The hash code for this object.
no setterinherited
max num
The maximum value of the range (inclusive).
final
message String
Gets the error message associated with the Between rule.
getter/setter pairinherited-setteroverride-getter
min num
The minimum value of the range (inclusive).
final
ruleKey String
The unique key identifying the validation rule.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildMessage(String attribute, String input, {String onExtra(String)?}) String
Builds a validation error message by replacing placeholders in the error message template.
inherited
call(String attribute, String value) String?
Validates whether a numeric value falls within the specified range.
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

Constants

key → const String
The unique identifier for the Between validation rule.