add correct error reporting for blank password (#7391)
* add correct error reporting for blank password * fix prettier --------- Co-authored-by: zuccs <daniel@zuccon.com>
This commit is contained in:
@@ -41,8 +41,8 @@ export const SetNewPasswordForm = ({
|
|||||||
// Check that the code is correct. We do this again just incase the user enters the code after their pw and we
|
// Check that the code is correct. We do this again just incase the user enters the code after their pw and we
|
||||||
// don't get to call onBlur first
|
// don't get to call onBlur first
|
||||||
const formattedCode = checkAndFormatResetCode(resetCode)
|
const formattedCode = checkAndFormatResetCode(resetCode)
|
||||||
// TODO Better password strength check
|
|
||||||
if (!formattedCode || !password) {
|
if (!formattedCode) {
|
||||||
setError(
|
setError(
|
||||||
_(
|
_(
|
||||||
msg`You have entered an invalid code. It should look like XXXXX-XXXXX.`,
|
msg`You have entered an invalid code. It should look like XXXXX-XXXXX.`,
|
||||||
@@ -51,6 +51,12 @@ export const SetNewPasswordForm = ({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO Better password strength check
|
||||||
|
if (!password) {
|
||||||
|
setError(_(msg`Please enter a password.`))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
setError('')
|
setError('')
|
||||||
setIsProcessing(true)
|
setIsProcessing(true)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user