forked from AY2324S1-CS2103T-W08-1/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request AY2324S1-CS2103T-W08-1#135 from craigtonlian/updat…
…e-input-validation Update input validation
- Loading branch information
Showing
20 changed files
with
49 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
"name" : "Bob Choo", | ||
"phone" : "22222222", | ||
"email" : "[email protected]", | ||
"position" : "Block 123, Bobby Street 3", | ||
"position" : "Software Engineer", | ||
"interviews" : [] | ||
}, { | ||
"name" : "Carl Kurz", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,8 @@ public class CommandTestUtil { | |
public static final String VALID_PHONE_BOB = "22222222"; | ||
public static final String VALID_EMAIL_AMY = "[email protected]"; | ||
public static final String VALID_EMAIL_BOB = "[email protected]"; | ||
public static final String VALID_POSITION_AMY = "Block 312, Amy Street 1"; | ||
public static final String VALID_POSITION_BOB = "Block 123, Bobby Street 3"; | ||
public static final String VALID_POSITION_AMY = "Backend Engineer"; | ||
public static final String VALID_POSITION_BOB = "Software Engineer"; | ||
public static final String VALID_TYPE_TECHNICAL = "technical"; | ||
public static final String VALID_TYPE_BEHAVIORAL = "behavioral"; | ||
public static final String VALID_RATING_TEN = "10.0"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ public void isValidEmail() { | |
assertFalse(Email.isValidEmail("peter@[email protected]")); // '@' symbol in local part | ||
assertFalse(Email.isValidEmail("[email protected]")); // local part starts with a hyphen | ||
assertFalse(Email.isValidEmail("[email protected]")); // local part ends with a hyphen | ||
assertFalse(Email.isValidEmail("[email protected]")); // exceed 30 characters | ||
// local part has two consecutive periods | ||
assertFalse(Email.isValidEmail("[email protected]")); | ||
assertFalse(Email.isValidEmail("peterjack@example@com")); // '@' symbol in domain name | ||
|
@@ -63,8 +64,6 @@ public void isValidEmail() { | |
assertTrue(Email.isValidEmail("123@145")); // numeric local part and domain name | ||
// mixture of alphanumeric and special characters | ||
assertTrue(Email.isValidEmail("[email protected]")); | ||
assertTrue(Email.isValidEmail("[email protected]")); // long domain name | ||
assertTrue(Email.isValidEmail("[email protected]")); // long local part | ||
assertTrue(Email.isValidEmail("[email protected]")); // more than one period in domain | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters