mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
fix: fixed text validator to accomodate minLength ints correctly (#2649)
This commit is contained in:
@@ -34,8 +34,8 @@ class TextValidator extends Validator<String> {
|
||||
return isAutovalidate ? true : false;
|
||||
}
|
||||
|
||||
final greaterThanMinLength = value.length > (minLength ?? 0);
|
||||
if (!greaterThanMinLength) return false;
|
||||
final greaterThanOrEqualToMinLength = value.length >= (minLength ?? 0);
|
||||
if (!greaterThanOrEqualToMinLength) return false;
|
||||
|
||||
final lengthMatched = length?.contains(value.length) ?? true;
|
||||
if (!lengthMatched) return false;
|
||||
|
||||
Reference in New Issue
Block a user