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.
Test Case
add n/testemaildomainhyphen p/92234567 e/email@gmail.c-m
Note: domain portion is valid, since c-m is at least 2 characters long, starts and ends with alphanumeric characters, and only separated by hyphens.
Expected Behaviour
Successful addition, assuming no duplicates
Encountered Behaviour
Addition rejected, invalid email format thrown.
Remarks, if any
Low as I'm not sure how often this happens in real life, functionality as it was not working as advertised on the UG.
Background
Domain part of email is specified as
Test Case
add n/testemaildomainhyphen p/92234567 e/email@gmail.c-m Note: domain portion is valid, since
c-m
is at least 2 characters long, starts and ends with alphanumeric characters, and only separated by hyphens.Expected Behaviour
Successful addition, assuming no duplicates
Encountered Behaviour
Addition rejected, invalid email format thrown.
Remarks, if any
Low as I'm not sure how often this happens in real life, functionality as it was not working as advertised on the UG.