Skip to content

Commit

Permalink
Merge pull request #147 from jiahui0309/change_prefix_symbols
Browse files Browse the repository at this point in the history
Refactor prefix symbols
  • Loading branch information
jiahui0309 authored Apr 4, 2024
2 parents 936dbb3 + 1bdfb6b commit 56f1b3e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
18 changes: 9 additions & 9 deletions src/main/java/seedu/address/logic/parser/CliSyntax.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
public class CliSyntax {

/* Prefix definitions */
public static final Prefix PREFIX_NAME = new Prefix("n/");
public static final Prefix PREFIX_IC_NUMBER = new Prefix("i/");
public static final Prefix PREFIX_AGE = new Prefix("ag/");
public static final Prefix PREFIX_SEX = new Prefix("s/");
public static final Prefix PREFIX_ADDRESS = new Prefix("a/");
public static final Prefix PREFIX_EMAIL = new Prefix("e/");
public static final Prefix PREFIX_PHONE = new Prefix("p/");
public static final Prefix PREFIX_TAG = new Prefix("t/");
public static final Prefix PREFIX_NOTE = new Prefix("n/");
public static final Prefix PREFIX_NAME = new Prefix("n\\");
public static final Prefix PREFIX_IC_NUMBER = new Prefix("i\\");
public static final Prefix PREFIX_AGE = new Prefix("ag\\");
public static final Prefix PREFIX_SEX = new Prefix("s\\");
public static final Prefix PREFIX_ADDRESS = new Prefix("a\\");
public static final Prefix PREFIX_EMAIL = new Prefix("e\\");
public static final Prefix PREFIX_PHONE = new Prefix("p\\");
public static final Prefix PREFIX_TAG = new Prefix("t\\");
public static final Prefix PREFIX_NOTE = new Prefix("n\\");
public static final Prefix PREFIX_FLAG = new Prefix("-replace");
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class IdentityCardNumber {

public static final IdentityCardNumber DEFAULT = new IdentityCardNumber("S0000000A");
public static final String MESSAGE_CONSTRAINTS =
"IC number starts with one letter (S,T,F,G,M) followed by seven digits and one letter behind"
"IC number starts with one letter (S,T,F,G,M) followed by seven digits and one letter behind.\n"
+ " It is case insensitive. An example is S1234567A.";

public static final String VALIDATION_REGEX = "[STFGMstfgm][0-9]{7}[A-Z,a-z]";
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/model/person/Name.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
public class Name {

public static final String MESSAGE_CONSTRAINTS =
"Names should only contain alphanumeric characters and spaces, and it should not be blank";
"Names should only contain alphanumeric characters, special characters ('-', '/', ',') and space.\n"
+ "It should also not be blank";

/*
* The first character of the address must not be a whitespace,
* otherwise " " (a blank string) becomes a valid input.
*/
public static final String VALIDATION_REGEX = "[\\p{Alnum}][\\p{Alnum} ]*";
public static final String VALIDATION_REGEX = "[\\p{Alnum}\\-/,][\\p{Alnum}\\-/, ]*";

public final String fullName;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/LightTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
}

.context-menu .label {
-fx-text-fill: white;
-fx-text-fill: black;
}

.menu-bar {
Expand Down

0 comments on commit 56f1b3e

Please sign in to comment.