Bug 977595
Summary: | Register username field has bad regex error message | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Zanata | Reporter: | Damian Jansen <djansen> | ||||
Component: | Component-UI | Assignee: | Alex Eng <aeng> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ding-Yi Chen <dchen> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 3.0 | CC: | aeng, sflaniga, zanata-bugs | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | 3.0.3-SNAPSHOT (20130819-0034) | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-11-27 03:22:40 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Damian Jansen
2013-06-25 01:25:23 UTC
Fix in 3.0.0-alpha-2-SNAPSHOT (20130625-1217) See: https://github.com/zanata/zanata-server/commit/aba980218fca919149fc91ad91b0a6dd6cc1b52d I think it's still a good idea to have the quotes around the regex. Also, Damian suggested a more descriptive message. How about this? javax.validation.constraints.Pattern.message=lowercase letters and digits (regex "{regexp}") javax.validation.constraints.Pattern.message is a generic key used for annotation @Pattern(regexp=). Propose to have new annotation for username validation if specific message needed for this case. Ignore the proposed solution above, overriding default message key for username validation. Implemented new message for username validation: lowercase letters and digits (regex "{regexp}") See https://github.com/zanata/zanata-server/commit/6d8c4a5792fc6f2b14e3354f3fce59d2db617b26 I'm not sure we really need to show a user the regex at all, and we don't tell them explicitly they can use underscores, but I'll consider this fixed. Testing with Zanata version 3.0.0-alpha-2-SNAPSHOT (20130809-1233) In Edit profile View: Invalid username still returns : must match ^[a-z\d_]{3,20}$ Step to reproduce: 1. Sign up use Google 2. Obtain authentication from Google. 3. In Edit Profile View, type "Aa" Expected: Error message: Allowed: lowercase letters, digits and underscores (regex "^[a-z\d_]{3,20}$") Actual: must match ^[a-z\d_]{3,20}$ ========================= Also, in Sign Up View, Since underscores are allowed, we should alos state that in error messages: Step to reproduce: 1. Go to sign up form by clicking "Sign Up" 2. In field username, enter "Aa" Expected: Error message: Allowed: lowercase letters, digits and underscores (regex "^[a-z\d_]{3,20}$") Actual: Error message: lowercase letters and digits (regex "^[a-z\d_]{3,20}$") Reassigned. VERIFIED with Zanata version 3.0.3-SNAPSHOT (20130819-0034) Closing bugs which were VERIFIED with snapshots <= 3.1. |