LyStringLengthLowerThan class

Validation that requires a string to have a minimum length.

If the length of the value is not shorter than len return message, otherwise it will return a null value.

Example:

final validation = StringLengthLowerThan(5, 'Must be at least 5 characters');
final result = validation('1234567');
print(result); // Must be at least 5 characters

Constructors

LyStringLengthLowerThan(String message, int len)
Validation that requires a string to have a minimum length.

Properties

hashCode int
The hash code for this object.
no setterinherited
len int
The length to compare the value to.
final
message String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String value) String?
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 &(LyBaseValidator<String> other) → LyBaseValidator<String>
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator |(LyBaseValidator<String> other) → LyBaseValidator<String>
inherited