Fix password validation with uppercase and lowercase minimum requirements (#34152)
Closes #34151 Signed-off-by: SebastEnn <103125747+SebastEnn@users.noreply.github.com>
This commit is contained in:
parent
d900397d6f
commit
e6e2bfdf30
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ const policies = {
|
|||
},
|
||||
upperCase: (policy, value) => {
|
||||
if (
|
||||
value.split("").filter((char) => char !== char.toUpperCase()).length >
|
||||
value.split("").filter((char) => char === char.toUpperCase() && char !== char.toLowerCase()).length <
|
||||
policy.value
|
||||
) {
|
||||
return templateError(policy);
|
||||
|
@ -19,7 +19,7 @@ const policies = {
|
|||
},
|
||||
lowerCase: (policy, value) => {
|
||||
if (
|
||||
value.split("").filter((char) => char !== char.toLowerCase()).length >
|
||||
value.split("").filter((char) => char === char.toLowerCase() && char !== char.toUpperCase()).length <
|
||||
policy.value
|
||||
) {
|
||||
return templateError(policy);
|
||||
|
|
Loading…
Reference in a new issue