MinAndMaxCharactersValidationRule class

Validates that the value is at least min size and at most max

Throws AssertionError if min <= 0. Throws AssertionError if max <= 0. Throws AssertionError if min > max.

Inheritance

Constructors

MinAndMaxCharactersValidationRule({required int min, required int max, String? customText, bool? showName})

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
Name of the rule. You can use this atribute to show the name of the rule to the user, for example.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showName bool
Determines if the name of the rule will be displayed.
no setteroverride

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) bool
A function that should be implemented and it represents the validation of the value. It should return Boolean indicating that the value passed pass the validation or not.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited