Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean validEmail(Customer customer)
- {
- String emailRegex = "^[a-zA-Z0-9_+&*-]+(?:\\." + "[a-zA-Z0-9_+&*-]+)*@" + "(?:[a-zA-Z0-9-]+\\.)+[a-z"+ "A-Z]{2,7}$";
- if(customer.getEmailAddress().matches(emailRegex))
- {
- return true;
- }
- return false;
- }
Add Comment
Please, Sign In to add comment