Describe the bug
The email validation logic in the login and registration forms is too permissive. It currently uses a loose regex pattern (.+@.+..+) defined in the organization configuration, which fails to catch invalid TLDs or common domain typos. For example, the system accepts user@gmal.com as a valid email address without any warning or rejection.
Steps To Reproduce
Steps to reproduce the behavior:
- Go to the Registration pageor Login page.
- Enter an email address with a common domain typo, such as vikramk2101@gmal.com.
- Observe that the form accepts the input as valid (the browser's built-in validation passes and no custom error is triggered).
- See that the invalid email is successfully submitted or displayed in the user's status after "login" as shown in the screenshot.
Expected behavior
The email field should implement a more robust validation pattern that:
Enforces a standard format with a valid TLD (e.g., [a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,}$).
(Bonus/Enhancement) Detects common domain typos (like gmal.com instead of gmail.com) and warns the user to prevent account recovery issues later.
Screenshots
System Informatioon:
OS: Windows (WSL Ubuntu)
Node.js: v18
Browser: Chromium-based (Chrome/Edge)
Describe the bug
The email validation logic in the login and registration forms is too permissive. It currently uses a loose regex pattern (.+@.+..+) defined in the organization configuration, which fails to catch invalid TLDs or common domain typos. For example, the system accepts user@gmal.com as a valid email address without any warning or rejection.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
The email field should implement a more robust validation pattern that:
Enforces a standard format with a valid TLD (e.g., [a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,}$).
(Bonus/Enhancement) Detects common domain typos (like gmal.com instead of gmail.com) and warns the user to prevent account recovery issues later.
Screenshots
System Informatioon:
OS: Windows (WSL Ubuntu)
Node.js: v18
Browser: Chromium-based (Chrome/Edge)