diff --git a/src/main/java/seedu/address/model/person/Ic.java b/src/main/java/seedu/address/model/person/Ic.java index f354e4f6fab..95548f2ea47 100644 --- a/src/main/java/seedu/address/model/person/Ic.java +++ b/src/main/java/seedu/address/model/person/Ic.java @@ -13,6 +13,7 @@ public class Ic { // Singapore regex for ic public static final String VALIDATION_REGEX = "^[A-Z]\\d{7}[A-Z]$"; + public final String value; /** @@ -25,6 +26,10 @@ public Ic(String value) { checkArgument(isValidIc(value), MESSAGE_CONSTRAINTS); this.value = value; } + + /** + * Returns true if a given string is a valid IC. + */ public static boolean isValidIc(String ic) { return ic.matches(VALIDATION_REGEX); }