mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-24 04:23:57 +03:00
Purpose: Enhance email validation in the SignInUpForm component. Changes: - Implemented strict email format validation. - Disabled the "Continue" button until email validation is complete. - Displayed error messages for invalid email formats. ![image](https://github.com/user-attachments/assets/62f3c114-002e-4f9f-b18f-5309dfc43587) --------- Co-authored-by: karankhatik <karan13699@gmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
parent
73cb8c5561
commit
284b2677be
@ -76,6 +76,10 @@ export const SignInUpForm = () => {
|
||||
if (signInUpStep === SignInUpStep.Init) {
|
||||
continueWithEmail();
|
||||
} else if (signInUpStep === SignInUpStep.Email) {
|
||||
if (isDefined(form?.formState?.errors?.email)) {
|
||||
setShowErrors(true);
|
||||
return;
|
||||
}
|
||||
continueWithCredentials();
|
||||
} else if (signInUpStep === SignInUpStep.Password) {
|
||||
if (!form.formState.isSubmitting) {
|
||||
@ -238,6 +242,10 @@ export const SignInUpForm = () => {
|
||||
return;
|
||||
}
|
||||
if (signInUpStep === SignInUpStep.Email) {
|
||||
if (isDefined(form?.formState?.errors?.email)) {
|
||||
setShowErrors(true);
|
||||
return;
|
||||
}
|
||||
continueWithCredentials();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user