Bug 629

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

Description ruiruyang2-c 2021-11-30 17:36:27 HKT
Steps to reproduce:
1. Enter the Login
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 prompt "Account doesn't exist. Would you like to register one?[Y/N]"

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 login() to verify if the email has the correct name .