Skip to content

Commit

Permalink
Merge pull request #89 from tengcharmaine/sex_field_bug
Browse files Browse the repository at this point in the history
  • Loading branch information
drustanyjt authored Mar 21, 2024
2 parents 18a3fbc + dd696a8 commit d579361
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/seedu/address/model/person/Sex.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Sex {
* The first character of the sex must not be a whitespace,
* otherwise " " (a blank string) becomes a valid input.
*/
public static final String VALIDATION_REGEX = "[MF]";
public static final String VALIDATION_REGEX = "[mfMF]";

public final String value;

Expand All @@ -44,11 +44,11 @@ public Sex(String sex) {
}

public boolean isMaleString(String sex) {
return sex.equals(MALE);
return sex.equalsIgnoreCase(MALE);
}

public boolean isFemaleString(String sex) {
return sex.equals(FEMALE);
return sex.equalsIgnoreCase(FEMALE);
}

public static boolean isValidSex(String test) {
Expand Down

0 comments on commit d579361

Please sign in to comment.