Add a new password rule
Password cannot contain username
This commit is contained in:
parent
f1b50fe051
commit
de96600122
1 changed files with 6 additions and 0 deletions
|
|
@ -124,6 +124,12 @@ const SignupModal = (props: Props) => {
|
|||
: 'That email address is not valid'
|
||||
break
|
||||
|
||||
case 'password':
|
||||
newErrors.password = passwordInput.current?.value.includes(usernameInput.current?.value!)
|
||||
? 'Your password should not contain your username'
|
||||
: ''
|
||||
break
|
||||
|
||||
case 'password':
|
||||
newErrors.password = value.length < 8
|
||||
? 'Password must be at least 8 characters'
|
||||
|
|
|
|||
Loading…
Reference in a new issue