Max class
A validation rule for checking if the length of a value does not exceed a specified maximum.
The Max class is a concrete implementation of the FormifyRule abstract class.
It is used to validate whether the length of a value does not exceed a specified maximum length.
This rule checks if the length of the input value does not exceed the provided number.
If the length of the value exceeds the number, an error message is generated.
- Inheritance
-
- Object
- FormifyRule
- Max
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- message ↔ String
-
Gets the error message associated with the
Maxrule.getter/setter pairinherited-setteroverride-getter - number → num
-
The maximum length allowed for the value.
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 the length of a value does not exceed the specified
number.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