nus-cs2103-AY2324S2 / pe-dev-response

0 stars 0 forks source link

Application accepts bad email #503

Open nus-pe-bot opened 1 month ago

nus-pe-bot commented 1 month ago

Description

The application accepts bad emails such as 'example@com' which should not be the case since such emails are invalid.

image.png

Steps to reproduce

  1. Input the command add n/Xavier Tan p/98765432 e/xavt@mail a/Ang Mo Kio street 2, Block 123, #01-01 (Notice how the email inputted here is an invalid one).
  2. Hit 'Enter'.
  3. Contact is added to the system.

Expected Behaviour

Application should show an error to input a correct email.

Actual

System still inputs the new contact.


[original: nus-cs2103-AY2324S2/pe-interim#653] [original labels: type.FeatureFlaw severity.VeryLow]

peienlim commented 1 month ago

Team's Response

We understand your concern, but we will have to reject this bug as xavt@mail is indeed a valid email. This is based on the standard email name conventions which states that the domain (the part after @) can be a local domain name without TLD (eg. .com), meaning that emails without a dot are allowed. You can read more here to find out more about this issue.

In terms of the local domain name, there are no restrictions as well as it is determined by the person who created the email. Screenshot 2024-04-22 at 11.11.02.png

You can find more details in the following website on the naming conventions for emails here.

Duplicate status (if any):

--