Merge pull request #981 from automatisch/fix-signup-email

fix: add custom email error message for signup
This commit is contained in:
Ali BARIN
2023-03-07 13:30:06 +01:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -17,7 +17,11 @@ import useFormatMessage from 'hooks/useFormatMessage';
const validationSchema = yup.object().shape({
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'),
confirmPassword: yup
.string()

View File

@@ -116,6 +116,7 @@
"signupForm.passwordFieldLabel": "Password",
"signupForm.confirmPasswordFieldLabel": "Confirm password",
"signupForm.submit": "Sign up",
"signupForm.validateEmail": "Email must be valid.",
"signupForm.passwordsMustMatch": "Passwords must match.",
"signupForm.mandatoryInput": "{inputName} is required.",
"loginForm.title": "Login",