Skip to content

Commit

Permalink
Merge pull request #182 from Andrew22Teoh/ExpandTagRegex
Browse files Browse the repository at this point in the history
Expand tag regex
  • Loading branch information
Andrew22Teoh authored Nov 4, 2024
2 parents 933ecca + b0afb7f commit 46df264
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 55 deletions.
3 changes: 3 additions & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ _Details coming soon ..._
* Spaces in the middle of a phone number are accepted (eg. 9123 4523), as are phone numbers without spaces (eg. 91234523).
* Spaces in unusual locations will render the phone number invalid (eg. 912 34523).

### Tags
* Tags can contain any characters, but they should not begin with whitespace.
* You can include hyphens and spaces as necessary between words for tags that are multiple words long!
--------------------------------------------------------------------------------------------------------------------

## FAQ
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/seedu/address/model/tag/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
public class Tag {

public static final String MESSAGE_CONSTRAINTS = "Tags names should be alphanumeric";
public static final String VALIDATION_REGEX = "\\p{Alnum}+";
public static final String MESSAGE_CONSTRAINTS = "Tags cannot be empty or start with whitespace.";
public static final String VALIDATION_REGEX = "\\S.*";

public final String tagName;

Expand Down Expand Up @@ -53,7 +53,7 @@ public int hashCode() {
}

/**
* Format state as text for viewing.
* Formats state as text for viewing.
*/
public String toString() {
return '[' + tagName + ']';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"phone" : "98765432",
"email" : "[email protected]",
"address" : "311, Clementi Ave 2, #02-25",
"tags" : [ "owesMoney", "friends" ],
"tags" : [ "owes money", "friends" ],
"dateOfLastVisit" : "01-02-2024",
"emergencyContact" : "92173902",
"remark": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"phone" : "98765432",
"email" : "[email protected]",
"address" : "311, Clementi Ave 2, #02-25",
"tags" : [ "owesMoney", "friends" ],
"tags" : [ "owes money", "friends" ],
"dateOfLastVisit" : "01-02-2024",
"emergencyContact" : "92173902",
"remark" : ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class CommandTestUtil {
public static final String VALID_EMERGENCY_CONTACT_BOB = VALID_PHONE_BOB;
public static final String VALID_ADDRESS_AMY = "Block 312, Amy Street 1";
public static final String VALID_ADDRESS_BOB = "Block 123, Bobby Street 3";
public static final String VALID_TAG_HUSBAND = "husband";
public static final String VALID_TAG_CONVICT = "ex-convict";
public static final String VALID_TAG_FRIEND = "friend";
public static final String VALID_DATEOFLASTVISIT_AMY = "12-12-2023";
public static final String VALID_DATEOFLASTVISIT_BOB = "09-09-2024";
Expand All @@ -58,7 +58,7 @@ public class CommandTestUtil {
public static final String ADDRESS_DESC_AMY = " " + PREFIX_ADDRESS + VALID_ADDRESS_AMY;
public static final String ADDRESS_DESC_BOB = " " + PREFIX_ADDRESS + VALID_ADDRESS_BOB;
public static final String TAG_DESC_FRIEND = " " + PREFIX_TAG + VALID_TAG_FRIEND;
public static final String TAG_DESC_HUSBAND = " " + PREFIX_TAG + VALID_TAG_HUSBAND;
public static final String TAG_DESC_CONVICT = " " + PREFIX_TAG + VALID_TAG_CONVICT;
public static final String DATEOFLASTVISIT_DESC_AMY = " " + PREFIX_DATEOFLASTVISIT
+ VALID_DATEOFLASTVISIT_AMY;
public static final String DATEOFLASTVISIT_DESC_BOB = " " + PREFIX_DATEOFLASTVISIT
Expand All @@ -79,7 +79,7 @@ public class CommandTestUtil {
// empty string not allowed for addresses
public static final String INVALID_ADDRESS_DESC = " " + PREFIX_ADDRESS;
// '*' not allowed in tags
public static final String INVALID_TAG_DESC = " " + PREFIX_TAG + "hubby*";
public static final String INVALID_TAG_DESC = " " + PREFIX_TAG + " ";
// date should only be in the format: dd/MM/yyyy, separated by '-'
public static final String INVALID_DATEOFLASTVISIT_DESC = " " + PREFIX_DATEOFLASTVISIT + "13/13/2023";

Expand All @@ -96,7 +96,7 @@ public class CommandTestUtil {
.withEmergencyContact(VALID_EMERGENCY_CONTACT_AMY).withRemark(VALID_REMARK_AMY).build();
DESC_BOB = new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)
.withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)
.withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).withDateOfLastVisit(VALID_DATEOFLASTVISIT_BOB)
.withTags(VALID_TAG_CONVICT, VALID_TAG_FRIEND).withDateOfLastVisit(VALID_DATEOFLASTVISIT_BOB)
.withEmergencyContact(VALID_EMERGENCY_CONTACT_BOB).withRemark(VALID_REMARK_BOB).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CONVICT;
import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;
import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;
import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex;
Expand Down Expand Up @@ -56,10 +56,10 @@ public void execute_someFieldsSpecifiedUnfilteredList_success() {

PersonBuilder personInList = new PersonBuilder(lastPerson);
Person editedPerson = personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)
.withTags(VALID_TAG_HUSBAND).build();
.withTags(VALID_TAG_CONVICT).build();

EditPersonDescriptor descriptor = new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)
.withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();
.withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_CONVICT).build();
EditCommand editCommand = new EditCommand(indexLastPerson, descriptor);

String expectedMessage = String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, Messages.format(editedPerson));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import static seedu.address.logic.commands.CommandTestUtil.VALID_EMERGENCY_CONTACT_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CONVICT;

import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -56,7 +56,7 @@ public void equals() {
assertFalse(DESC_AMY.equals(editedAmy));

// different tags -> returns false
editedAmy = new EditPersonDescriptorBuilder(DESC_AMY).withTags(VALID_TAG_HUSBAND).build();
editedAmy = new EditPersonDescriptorBuilder(DESC_AMY).withTags(VALID_TAG_CONVICT).build();
assertFalse(DESC_AMY.equals(editedAmy));

// different dateOfLastVisit -> returns false
Expand Down
34 changes: 21 additions & 13 deletions src/test/java/seedu/address/logic/parser/AddCommandParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;
import static seedu.address.logic.commands.CommandTestUtil.PREAMBLE_NON_EMPTY;
import static seedu.address.logic.commands.CommandTestUtil.PREAMBLE_WHITESPACE;
import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_CONVICT;
import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;
import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;
import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_DATEOFLASTVISIT_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CONVICT;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;
import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;
import static seedu.address.logic.parser.CliSyntax.PREFIX_DATEOFLASTVISIT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
Expand Down Expand Up @@ -74,9 +74,9 @@ public void parse_allFieldsPresent_success() {

// multiple tags - all accepted
Person expectedPersonMultipleTags = new PersonBuilder(BOB)
.withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();
.withTags(VALID_TAG_FRIEND, VALID_TAG_CONVICT).build();
assertParseSuccess(parser,
NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND
NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + TAG_DESC_CONVICT
+ TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB + EMERGENCY_CONTACT_DESC_BOB,
new AddCommand(expectedPersonMultipleTags));
}
Expand Down Expand Up @@ -261,7 +261,7 @@ public void parse_compulsoryFieldMissing_failure() {
public void parse_nameWithNonAlphanumeric_success() {
Person expectedPerson = new PersonBuilder(BOB).build();
assertParseSuccess(parser,
NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND
NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + TAG_DESC_CONVICT
+ TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB + EMERGENCY_CONTACT_DESC_BOB,
new AddCommand(expectedPerson));
}
Expand All @@ -271,45 +271,53 @@ public void parse_invalidValue_failure() {
// invalid name
assertParseFailure(
parser, INVALID_NAME_DESC + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB
+ TAG_DESC_HUSBAND + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB,
+ TAG_DESC_CONVICT + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB,
Name.MESSAGE_CONSTRAINTS);

// invalid phone
assertParseFailure(
parser, NAME_DESC_BOB + INVALID_PHONE_DESC + EMAIL_DESC_BOB + ADDRESS_DESC_BOB
+ TAG_DESC_HUSBAND + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB,
+ TAG_DESC_CONVICT + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB,
Phone.MESSAGE_CONSTRAINTS);

// invalid email
assertParseFailure(
parser, NAME_DESC_BOB + PHONE_DESC_BOB + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB
+ TAG_DESC_HUSBAND + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB,
+ TAG_DESC_CONVICT + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB,
Email.MESSAGE_CONSTRAINTS);

// invalid tag
// single invalid tag
assertParseFailure(parser, NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB
+ INVALID_TAG_DESC + VALID_TAG_FRIEND + DATEOFLASTVISIT_DESC_BOB, Tag.MESSAGE_CONSTRAINTS);
+ INVALID_TAG_DESC + DATEOFLASTVISIT_DESC_BOB, Tag.MESSAGE_CONSTRAINTS);

// valid tag followed by invalid tag
assertParseFailure(parser, NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB
+ TAG_DESC_CONVICT + INVALID_TAG_DESC + DATEOFLASTVISIT_DESC_BOB, Tag.MESSAGE_CONSTRAINTS);

// invalid tag followed by valid tag
assertParseFailure(parser, NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB
+ INVALID_TAG_DESC + TAG_DESC_CONVICT + DATEOFLASTVISIT_DESC_BOB, Tag.MESSAGE_CONSTRAINTS);

// two invalid values, only first invalid value reported
assertParseFailure(parser, INVALID_NAME_DESC + PHONE_DESC_BOB + EMAIL_DESC_BOB + INVALID_ADDRESS_DESC
+ DATEOFLASTVISIT_DESC_BOB, Name.MESSAGE_CONSTRAINTS);

// invalid dateOfLastVisit
assertParseFailure(parser,
NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND
NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + TAG_DESC_CONVICT
+ TAG_DESC_FRIEND + INVALID_DATEOFLASTVISIT_DESC,
DateOfLastVisit.MESSAGE_CONSTRAINTS);

// invalid emergency contact
assertParseFailure(parser,
NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND
NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + TAG_DESC_CONVICT
+ TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB + INVALID_EMERGENCY_CONTACT_DESC,
EmergencyContact.MESSAGE_CONSTRAINTS);

// non-empty preamble
assertParseFailure(parser,
PREAMBLE_NON_EMPTY + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB + ADDRESS_DESC_BOB
+ TAG_DESC_HUSBAND + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB,
+ TAG_DESC_CONVICT + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB,
String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMERGENCY_CONTACT_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;
import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;
import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;
import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;
import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_CONVICT;
import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;
import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;
import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_DATEOFLASTVISIT_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_DATEOFLASTVISIT_BOB;
Expand All @@ -32,8 +31,8 @@
import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;
import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CONVICT;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;
import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;
import static seedu.address.logic.parser.CliSyntax.PREFIX_DATEOFLASTVISIT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
Expand Down Expand Up @@ -105,8 +104,6 @@ public void parse_invalidValue_failure() {
assertParseFailure(parser, "1" + INVALID_PHONE_DESC, Phone.MESSAGE_CONSTRAINTS);
// invalid email
assertParseFailure(parser, "1" + INVALID_EMAIL_DESC, Email.MESSAGE_CONSTRAINTS);
// invalid tag
assertParseFailure(parser, "1" + INVALID_TAG_DESC, Tag.MESSAGE_CONSTRAINTS);
// invalid dateOfLastVisit
assertParseFailure(parser, "1" + INVALID_DATEOFLASTVISIT_DESC, DateOfLastVisit.MESSAGE_CONSTRAINTS);
// invalid emergencyContact
Expand All @@ -118,11 +115,11 @@ public void parse_invalidValue_failure() {

// while parsing {@code PREFIX_TAG} alone will reset the tags of the {@code Person} being
// edited, parsing it together with a valid tag results in error
assertParseFailure(parser, "1" + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + TAG_EMPTY,
assertParseFailure(parser, "1" + TAG_DESC_FRIEND + TAG_DESC_CONVICT + TAG_EMPTY,
Tag.MESSAGE_CONSTRAINTS);
assertParseFailure(parser, "1" + TAG_DESC_FRIEND + TAG_EMPTY + TAG_DESC_HUSBAND,
assertParseFailure(parser, "1" + TAG_DESC_FRIEND + TAG_EMPTY + TAG_DESC_CONVICT,
Tag.MESSAGE_CONSTRAINTS);
assertParseFailure(parser, "1" + TAG_EMPTY + TAG_DESC_FRIEND + TAG_DESC_HUSBAND,
assertParseFailure(parser, "1" + TAG_EMPTY + TAG_DESC_FRIEND + TAG_DESC_CONVICT,
Tag.MESSAGE_CONSTRAINTS);

// multiple invalid values, but only the first invalid value is captured
Expand All @@ -135,13 +132,13 @@ public void parse_invalidValue_failure() {
@Test
public void parse_allFieldsSpecified_success() {
Index targetIndex = INDEX_SECOND_PERSON;
String userInput = targetIndex.getOneBased() + PHONE_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_AMY
String userInput = targetIndex.getOneBased() + PHONE_DESC_BOB + TAG_DESC_CONVICT + EMAIL_DESC_AMY
+ ADDRESS_DESC_AMY + NAME_DESC_AMY + TAG_DESC_FRIEND + DATEOFLASTVISIT_DESC_BOB
+ EMERGENCY_CONTACT_DESC_AMY;

EditPersonDescriptor descriptor = new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)
.withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)
.withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).withDateOfLastVisit(VALID_DATEOFLASTVISIT_BOB)
.withTags(VALID_TAG_CONVICT, VALID_TAG_FRIEND).withDateOfLastVisit(VALID_DATEOFLASTVISIT_BOB)
.withEmergencyContact(VALID_EMERGENCY_CONTACT_AMY).build();
EditCommand expectedCommand = new EditCommand(targetIndex, descriptor);

Expand Down Expand Up @@ -241,15 +238,15 @@ public void parse_multipleRepeatedFields_failure() {
// mulltiple valid fields repeated
userInput = targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY
+ TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND
+ PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND;
+ PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_CONVICT;

assertParseFailure(parser, userInput,
Messages.getErrorMessageForDuplicatePrefixes(PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS));

// mulltiple valid fields repeated (dateOfLastVisit, phone, email, address)
userInput = targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY
+ TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND
+ PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND
+ PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_CONVICT
+ DATEOFLASTVISIT_DESC_AMY + DATEOFLASTVISIT_DESC_AMY;

assertParseFailure(parser, userInput, Messages.getErrorMessageForDuplicatePrefixes(PREFIX_PHONE,
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/seedu/address/logic/parser/ParserUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ParserUtilTest {
private static final String INVALID_LONG_PHONE = "123456789";
private static final String INVALID_EMAIL = "example.com";
private static final String INVALID_EMERGENCY_CONTACT = INVALID_PHONE;
private static final String INVALID_TAG = "#friend";
private static final String INVALID_TAG = " ";
private static final String INVALID_DATEOFLASTVISIT = "13/13/2024";

private static final String NO_ENTRY = "";
Expand All @@ -43,7 +43,7 @@ public class ParserUtilTest {
private static final String VALID_EMAIL = "[email protected]";
private static final String VALID_EMERGENCY_CONTACT = "62345678";
private static final String VALID_TAG_1 = "friend";
private static final String VALID_TAG_2 = "neighbour";
private static final String VALID_TAG_2 = "nut allergy";
private static final String VALID_DATEOFLASTVISIT = "02-02-2024";

private static final String WHITESPACE = " \t\r\n";
Expand Down
Loading

0 comments on commit 46df264

Please sign in to comment.