Skip to content

Commit

Permalink
Merge pull request #3 from ZHIFA-CHIU/SpringCustValiFix
Browse files Browse the repository at this point in the history
Fixed Customer Validate method
  • Loading branch information
Jack-Is-2048 authored Apr 4, 2022
2 parents 12509d6 + e94c454 commit cb86a3d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ public String toString() {
}

public boolean validateCustomer() {
if (name == "" || email == "" || dob.isBefore(LocalDate.of(1920, Month.JANUARY, 1))) {
if (name.equals("") || email.equals("") || dob.isBefore(LocalDate.of(1920, Month.JANUARY, 1))) {
return false;
}
return true;
}
}
}

0 comments on commit cb86a3d

Please sign in to comment.