MinLengthValidator class

MinLengthValidator checks the minimum length of a string.

Implemented types

Constructors

MinLengthValidator.new(int minLength, {String? customErrorMessage})

Properties

customErrorMessage String?
The custom error message for this validator.
getter/setter pairoverride-getter
defaultErrorMessage String
The default error message for this validator. Can be overridden when creating an instance of the validator.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
minLength int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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) String?
Takes the current value of the field Returns a string with the error message if the value is invalid, otherwise null.
override

Operators

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