Skip to content
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

PE-Dry fixes #157

Merged
7 commits merged into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class AddCommand extends Command {
+ PREFIX_EMAIL + "EMAIL "
+ PREFIX_FACULTY + "FACULTY "
+ PREFIX_ROLE + "ROLE "
+ PREFIX_TELEGRAM + "TELEGRAM "
+ "[" + PREFIX_TELEGRAM + "TELEGRAM] "
+ "[" + PREFIX_TAG + "TAG]...\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/model/person/Email.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public class Email {
+ "The domain name must:\n"
+ " - end with a domain label at least 2 characters long\n"
+ " - have each domain label start and end with alphanumeric characters\n"
+ " - have each domain label consist of alphanumeric characters, separated only by hyphens, if any.";
+ " - have each domain label consist of alphanumeric characters, separated only by hyphens "
+ "or underscores, if any.";
// alphanumeric and special characters
private static final String ALPHANUMERIC_NO_UNDERSCORE = "[^\\W_]+"; // alphanumeric characters except underscore
private static final String LOCAL_PART_REGEX = "^" + ALPHANUMERIC_NO_UNDERSCORE + "([" + SPECIAL_CHARACTERS + "]"
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/model/tag/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
*/
public class Tag {

public static final String MESSAGE_CONSTRAINTS = "Tags names should be alphanumeric";
public static final String MESSAGE_CONSTRAINTS = "Tag names should: "
+ "\n1. Be alphanumeric \n2. Not contain spaces\n3. Not be empty";
public static final String VALIDATION_REGEX = "\\p{Alnum}+";

public final String tagName;
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/seedu/address/model/telegram/Telegram.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
*/
public class Telegram {

public static final String MESSAGE_CONSTRAINTS = "Following telegram's restrictions,"
+ " usernames must be 5 to 32 characters long and not ending with an underscore.";

public static final String MESSAGE_CONSTRAINTS = "Telegram usernames should be of the format @name "
+ "and adhere to the following constraints:\n"
+ "- usernames should start with a '@' and followed by a name\n"
+ "- name should be 5 to 32 characters long.\n"
+ "- name should be alphanumeric.\n"
+ "- name should not contain special characters except underscore.\n"
+ "- name should not end with an underscore.\n";
/*
* The first character of the address must not be a whitespace,
* otherwise " " (a blank string) becomes a valid input.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/ui/HelpWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
public class HelpWindow extends UiPart<Stage> {
public static final String USERGUIDE_URL =
"https://github.com/AY2122S2-CS2103T-W11-4/tp/blob/master/docs/UserGuide.md";
"https://ay2122s2-cs2103t-w11-4.github.io/tp/UserGuide.html";
private static final String HELP_ADD_MESSAGE =
"\nTo add contact:\n add n/{name} e/{email} a/{address}\n";
private static final String HELP_LIST_MESSAGE =
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/NusTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
-fx-background-color: transparent;
-fx-font-family: "Courier New";
-fx-font-size: 13pt;
-fx-text-fill: white;
-fx-text-fill: black;
}

.result-display .label {
Expand Down