validateMaxLength static method
Validates if the value matches the max length using MaxLengthRule.
Returns true
if the value is within the max length, otherwise false
.
Example:
IstValidator.validateMaxLength("hello", 10); // true
IstValidator.validateMaxLength("helloooooo", 5); // false
Implementation
static bool validateMaxLength(String value, int maxLength) {
return MaxLengthRule(maxLength).validate(value) == null;
}