MaxLengthValidator class
A validator that ensures the string does not exceed max characters.
Useful for form fields like name, title, descriptions, etc.
- Inheritance
-
- Object
- FabrikValidator<
String> - MaxLengthValidator
Constructors
- MaxLengthValidator({required int max, String message = 'Too long'})
-
Creates a MaxLengthValidator.
const
Properties
Methods
-
call(
String value) → String? -
Returns
nullif valid, or an error message if invalid.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