LyStringLengthLowerThan constructor
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
Implementation
LyStringLengthLowerThan(super.message, this.len);