marraknas / pe

0 stars 0 forks source link

Valid emails being considered as invalid emails #5

Closed marraknas closed 1 week ago

marraknas commented 1 week ago

Steps to reproduce

(Very rare case for the user to have this email)

  1. Try to add someone in using this command add n/John Doe p/98765432 e/gg@g-g.c-o-m a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney

  2. Notice that the email provided in this command is valid as followed by the specifications for the email as shown below:

Emails should be of the format local-part@domain and adhere to the following constraints:

  1. The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, (+_.-). The local-part may not start or end with any special characters.
  2. This is followed by a '@' and then a domain name. The domain name is made up of domain labels separated by periods. The domain name must:
    • end with a domain label at least 2 characters long
    • have each domain label start and end with alphanumeric characters
    • have each domain label consist of alphanumeric characters, separated only by hyphens, if any.

Screenshot 2024-11-15 at 4.45.49 PM.png

Expected Output

Actual Output

Suggestions