Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Implement detail username validation message: https://bugzilla.redhat…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jun 25, 2013
1 parent e7a35cf commit 6d8c4a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -99,7 +99,7 @@ public void setUsername(String username)

@NotEmpty
@Size(min = 3, max = 20)
@Pattern(regexp = "^[a-z\\d_]{3,20}$")
@Pattern(regexp = "^[a-z\\d_]{3,20}$", message = "{validation.username.constraints}")
public String getUsername()
{
return username;
Expand Down
4 changes: 3 additions & 1 deletion zanata-war/src/main/resources/ValidationMessages.properties
Expand Up @@ -15,4 +15,6 @@ javax.validation.constraints.Url.message=must be a valid URL
#javax.validation.constraints.UrlNoSlash.message=must be a valid URL (without final slash)
javax.validation.constraints.NotDuplicateEmail.message=duplicate email
javax.validation.constraints.EmailList.message=invalid email or incorrect comma placement
org.jboss.seam.captcha.error=incorrect response
org.jboss.seam.captcha.error=incorrect response

validation.username.constraints=lowercase letters and digits (regex "{regexp}")

0 comments on commit 6d8c4a5

Please sign in to comment.