Skip to content

Commit

Permalink
fix: fixing BE build
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Jun 26, 2023
1 parent 0852b37 commit 79bd743
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ public static void validateEmail(String email, String field, Errors errors) {

public static void validatePhoneNumber(String phoneNumber, String field, Errors errors) {

if (StringUtils.isBlank(phoneNumber))
if (StringUtils.isBlank(phoneNumber)) {
errors.rejectValue(field, "The phone number must be a 10-digit number");
return;
}
//This is just to make sure we removed the mask from FE
String localPhoneNumber = phoneNumber.replaceAll("[^0-9]", "");
if (!StringUtils.isNumeric(localPhoneNumber) || StringUtils.length(localPhoneNumber) != 10) {
Expand Down

0 comments on commit 79bd743

Please sign in to comment.