mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 07:09:12 +01:00
checks against top password field rather than bottom
This commit is contained in:
parent
64fbfbf1d3
commit
8c4134c8ad
@ -15,20 +15,20 @@ const PasswordForm = (props) => {
|
|||||||
if (confirm === "" && password === "") {
|
if (confirm === "" && password === "") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (confirm.length < props.passwordLength) {
|
if (password.length < props.passwordLength) {
|
||||||
props.setMessage(passwordTooShortMessage)
|
props.setMessage(passwordTooShortMessage)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (props.passwordRequireCapital && !/[A-Z]/.test(confirm)) {
|
if (props.passwordRequireCapital && !/[A-Z]/.test(password)) {
|
||||||
props.setMessage(passwordRequiresCapitalMessage)
|
props.setMessage(passwordRequiresCapitalMessage)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (props.passwordRequireNumeric && !/\d/.test(confirm)) {
|
if (props.passwordRequireNumeric && !/\d/.test(password)) {
|
||||||
props.setMessage(passwordRequiresNumericMessage)
|
props.setMessage(passwordRequiresNumericMessage)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (props.passwordRequireSpecial) {
|
if (props.passwordRequireSpecial) {
|
||||||
if (!props.passwordValidSpecialCharacters.split("").some(v => confirm.includes(v))) {
|
if (!props.passwordValidSpecialCharacters.split("").some(v => password.includes(v))) {
|
||||||
props.setMessage(passwordRequiresSpecialMessage)
|
props.setMessage(passwordRequiresSpecialMessage)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user