Bug 629 - Failed to verify that the email is valid.
Summary: Failed to verify that the email is valid.
Status: RESOLVED FIXED
Alias: None
Product: New-Territories-Cycle-Track-Navigation-System
Classification: Unclassified
Component: Login (show other bugs)
Version: 1.0
Hardware: PC Windows
: Normal normal
Assignee: ruiruyang2-c
URL:
Depends on:
Blocks:
 
Reported: 2021-11-30 17:36 HKT by ruiruyang2-c
Modified: 2021-11-30 17:44 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 .