Skip to content

Commit

Permalink
Revised constrains for Tag creation
Browse files Browse the repository at this point in the history
Tag now allows punctuation as well as any character can make up a word.
'/' however, is not accepted
  • Loading branch information
alexfjw committed Nov 6, 2016
1 parent a242755 commit 470b3f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/seedu/taskman/model/tag/Tag.java
Expand Up @@ -9,8 +9,9 @@
*/
public class Tag {

public static final String MESSAGE_TAG_CONSTRAINTS = "Tags names should be alphanumeric";
public static final String TAG_VALIDATION_REGEX = "\\p{Alnum}+";
public static final String MESSAGE_TAG_CONSTRAINTS = "Tag name should form a word. " +
"All punctuation except '/' is accepted";
public static final String TAG_VALIDATION_REGEX = "[\\w\\p{Punct}&&[^/]]+";

public String tagName;

Expand Down

0 comments on commit 470b3f6

Please sign in to comment.