ConnectPlus-Org / ConnectPlus-Frontend

Frontend Repository of ConnectPlus
https://connect-plus-frontend.vercel.app
8 stars 27 forks source link

Improve email validation #20

Closed MaxR522 closed 9 months ago

MaxR522 commented 9 months ago

Currently, when the email contains @ + 1 char, it will validate, but the proper way is to check :

  1. Local Part: This is the part of the email address that appears before the "@" symbol. It can consist of a combination of letters (both uppercase and lowercase), digits, and certain special characters such as periods (.), underscores (_), percent signs (%), plus signs (+), and hyphens (-).

  2. The "@" Symbol: This symbol is used to separate the local part from the domain part of the email address.

  3. Domain Part: This is the part of the email address that appears after the "@" symbol and before the top-level domain (TLD). It typically consists of one or more domain segments separated by periods (e.g., "example.com" or "subdomain.example.co.uk").

  4. Top-Level Domain (TLD): The TLD is the last part of the domain, such as ".com," ".org," ".net," or a country code TLD like ".uk" or ".ca." TLDs usually consist of letters only, and there must be at least two letters in the TLD.

MaxR522 commented 9 months ago

I will solve it