Bug 630

Summary: Failed to verify that the email is valid.
Product: New-Territories-Cycle-Track-Navigation-System Reporter: ruiruyang2-c
Component: RegisterAssignee: ruiruyang2-c
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: 1.0   
Hardware: PC   
OS: Windows   

Description ruiruyang2-c 2021-11-30 17:41:52 HKT
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.