-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email validation #241
Email validation #241
Conversation
contacts in FriendDex. A success message is shown in the status message. | ||
|
||
3. Adding a duplicate person. <br> | ||
* Prerequisite: A person with the name `john doe` must already be in FriendDex. <br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add something here saying that the names are case-insensitive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this point should belong in the UG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think its better to state it here as the developer may not have looked at the UG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a link to the particular section in the UG. Explaining the intricacies of a command shouldn't fall under test manual.
docs/UserGuide.md
Outdated
**A**: Email stored in FriendDex is a wilful violation of (RFC 5322)[https://tools.ietf.org/html/rfc5322]. The email | ||
allowed in FriendDex shall adhere to the following rules: | ||
* Emails shall have the format `local-part@label(.label)*`. | ||
* `local-part` contains at least one alphanumeric character with the following special characters <code>.!#$%&'*+\/=?^_`{|}~-</code>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be without?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with is correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can help reword to "local-part
contains at least one alphanumeric character. local-part
allows the following special characters .!#$%&'*+/=?^_`{|}~-
.
private static final String SPECIAL_CHARACTERS = "!#$%&'*+/=?`{|}~^.-"; | ||
public static final String MESSAGE_CONSTRAINTS = "Emails should be of the format local-part@domain " | ||
private static final String SPECIAL_CHARACTERS = ".!#$%&'*+/=?`{|}~^.-"; | ||
public static final String MESSAGE_CONSTRAINTS = "Emails should be of the format local-part@label(.label)*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify to English for the format portion, nobody will understand the brackets and asterisk. Emails should be of the format "local-part@label". Multiple labels can follow after provided that they are prefixed with a single period.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel that this expression is adequate. If the user doesn't get it he can just refer to point 3. I'll add an example in the usage message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, up to you. But I still opt for longer explanations for better clarity than brevity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Codecov Report
@@ Coverage Diff @@
## master #241 +/- ##
=========================================
Coverage 63.51% 63.51%
Complexity 800 800
=========================================
Files 135 135
Lines 3130 3130
Branches 348 348
=========================================
Hits 1988 1988
Misses 998 998
Partials 144 144
Continue to review full report at Codecov.
|
Apparently the regex checks that came with AB3 is incorrect.