password lowercase check like uppercase (#9343)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
d65d3b7326
commit
ab246fdcbf
@ -28,7 +28,11 @@ class LowercaseValidationRule extends ValidationRule {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool validate(String value) {
|
bool validate(String value) {
|
||||||
return value.contains(RegExp(r'[a-z]'));
|
return value.runes.any((int rune) {
|
||||||
|
var character = String.fromCharCode(rune);
|
||||||
|
return character.toLowerCase() == character &&
|
||||||
|
character.toUpperCase() != character;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user