Steps to reproduce: 1. Enter the Register 2. When being asked to enter an email, input "rho@gMail.com" or any others that did not comply with the naming rules of the email. Actual result: The software process to the next step, ask the user to input password. Expected result: The software prompt "Please input a correct email address!", then process to ask the user to input an email again. Solution: Add String pattern = "[a-zA-Z0-9_-]+@gmail.com$"; & !Pattern.matches(pattern, inpEmail) to register() to verify if the email has the correct name.