Merge pull request #981 from automatisch/fix-signup-email
fix: add custom email error message for signup
This commit is contained in:
@@ -17,7 +17,11 @@ import useFormatMessage from 'hooks/useFormatMessage';
|
|||||||
|
|
||||||
const validationSchema = yup.object().shape({
|
const validationSchema = yup.object().shape({
|
||||||
fullName: yup.string().trim().required('signupForm.mandatoryInput'),
|
fullName: yup.string().trim().required('signupForm.mandatoryInput'),
|
||||||
email: yup.string().trim().email().required('signupForm.mandatoryInput'),
|
email: yup
|
||||||
|
.string()
|
||||||
|
.trim()
|
||||||
|
.email('signupForm.validateEmail')
|
||||||
|
.required('signupForm.mandatoryInput'),
|
||||||
password: yup.string().required('signupForm.mandatoryInput'),
|
password: yup.string().required('signupForm.mandatoryInput'),
|
||||||
confirmPassword: yup
|
confirmPassword: yup
|
||||||
.string()
|
.string()
|
||||||
|
@@ -116,6 +116,7 @@
|
|||||||
"signupForm.passwordFieldLabel": "Password",
|
"signupForm.passwordFieldLabel": "Password",
|
||||||
"signupForm.confirmPasswordFieldLabel": "Confirm password",
|
"signupForm.confirmPasswordFieldLabel": "Confirm password",
|
||||||
"signupForm.submit": "Sign up",
|
"signupForm.submit": "Sign up",
|
||||||
|
"signupForm.validateEmail": "Email must be valid.",
|
||||||
"signupForm.passwordsMustMatch": "Passwords must match.",
|
"signupForm.passwordsMustMatch": "Passwords must match.",
|
||||||
"signupForm.mandatoryInput": "{inputName} is required.",
|
"signupForm.mandatoryInput": "{inputName} is required.",
|
||||||
"loginForm.title": "Login",
|
"loginForm.title": "Login",
|
||||||
@@ -136,4 +137,4 @@
|
|||||||
"resetPasswordForm.passwordFieldLabel": "Password",
|
"resetPasswordForm.passwordFieldLabel": "Password",
|
||||||
"resetPasswordForm.confirmPasswordFieldLabel": "Confirm password",
|
"resetPasswordForm.confirmPasswordFieldLabel": "Confirm password",
|
||||||
"resetPasswordForm.passwordUpdated": "The password has been updated. Now, you can login."
|
"resetPasswordForm.passwordUpdated": "The password has been updated. Now, you can login."
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user