diff --git a/src/views/Authorization/Signup.jsx b/src/views/Authorization/Signup.jsx index 021a389..4dc6988 100644 --- a/src/views/Authorization/Signup.jsx +++ b/src/views/Authorization/Signup.jsx @@ -70,7 +70,12 @@ const SignupView = () => { } if (password.length < 8) { - setPasswordError('Password must be at least 8 characters') + setPasswordError('Password must be between 8 and 64 characters') + isValid = false + } + + if (password.length > 64) { + setPasswordError('Password must be between 8 and 64 characters') isValid = false } @@ -218,6 +223,7 @@ const SignupView = () => { label='Password' type='password' id='password' + placeholder='Enter password (8-64 characters)' value={password} onChange={e => { setPasswordError(null) @@ -237,6 +243,7 @@ const SignupView = () => { name='displayName' label='Display Name' id='displayName' + placeholder='Confirm password' value={displayName} onChange={e => { setDisplayNameError(null) diff --git a/src/views/Authorization/UpdatePasswordView.jsx b/src/views/Authorization/UpdatePasswordView.jsx index d891706..dbce331 100644 --- a/src/views/Authorization/UpdatePasswordView.jsx +++ b/src/views/Authorization/UpdatePasswordView.jsx @@ -31,8 +31,8 @@ const UpdatePasswordView = () => { const handlePasswordChange = e => { const password = e.target.value setPassword(password) - if (password.length < 8) { - setPasswordError('Password must be at least 8 characters') + if (password.length < 8 || password.length > 64) { + setPasswordError('Password must be between 8 and 64 characters') } else { setPasswordError(null) } diff --git a/src/views/Modals/Inputs/CreateChildUserModal.jsx b/src/views/Modals/Inputs/CreateChildUserModal.jsx index d33c943..173d618 100644 --- a/src/views/Modals/Inputs/CreateChildUserModal.jsx +++ b/src/views/Modals/Inputs/CreateChildUserModal.jsx @@ -40,9 +40,9 @@ function CreateChildUserModal({ isOpen, onClose, onSuccess }) { if (!password) { newErrors.password = 'Password is required' } else if (password.length < 8) { - newErrors.password = 'Password must be at least 8 characters' - } else if (password.length > 45) { - newErrors.password = 'Password must be less than 45 characters' + newErrors.password = 'Password must be between 8 and 64 characters' + } else if (password.length > 64) { + newErrors.password = 'Password must be between 8 and 64 characters' } } @@ -165,7 +165,7 @@ function CreateChildUserModal({ isOpen, onClose, onSuccess }) { name='password' type='password' id='password' - placeholder='Enter password (8-45 characters)' + placeholder='Enter password (8-64 characters)' value={password} onChange={e => { setPassword(e.target.value) diff --git a/src/views/Modals/Inputs/PasswordChangeModal.jsx b/src/views/Modals/Inputs/PasswordChangeModal.jsx index f75c7ab..9d3cad7 100644 --- a/src/views/Modals/Inputs/PasswordChangeModal.jsx +++ b/src/views/Modals/Inputs/PasswordChangeModal.jsx @@ -25,8 +25,8 @@ function PassowrdChangeModal({ isOpen, onClose }) { setPasswordError('Passwords do not match') } else if (password.length < 8) { setPasswordError('Password must be at least 8 characters') - } else if (password.length > 50) { - setPasswordError('Password must be less than 50 characters') + } else if (password.length > 64) { + setPasswordError('Password must be less than 64 characters') } else { setPasswordError(null) } @@ -63,6 +63,7 @@ function PassowrdChangeModal({ isOpen, onClose }) { label='Password' type='password' id='password' + placeholder='Enter password (8-64 characters)' value={password} onChange={e => { setPasswordTouched(true)