CollectionMaxLengthValidator<T, TElement> class

Validator that checks the maximum length of a collection.

Inheritance

Constructors

CollectionMaxLengthValidator(int maxLength)

Properties

customErrorMessage String?
Custom error message override.
getter/setter pairinherited
defaultErrorMessage String
The default error message for this validator.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
maxLength int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getErrorMessage(ValidationContext<T> context, List<TElement>? value) String
Gets the error message for this validator.
inherited
isValid(ValidationContext<T> context, List<TElement>? value) bool
Determines if the value is valid.
override
isValidAsync(ValidationContext<T> context, List<TElement>? value) Future<bool>
Determines if the value is valid asynchronously.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(ValidationContext<T> context, List<TElement>? value, String propertyName) List<ValidationFailure>
Validates the property value.
inherited
validateAsync(ValidationContext<T> context, List<TElement>? value, String propertyName) Future<List<ValidationFailure>>
Validates the property value asynchronously.
inherited

Operators

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