diff options
author | jessib <jessib@leap.se> | 2013-02-26 11:33:11 -0800 |
---|---|---|
committer | jessib <jessib@leap.se> | 2013-02-26 12:05:37 -0800 |
commit | a7722e57ee6e10b578457e880f04349f7f9a0f66 (patch) | |
tree | 1e76a1136f768b60cd2ef4927820350ba826b30f /users | |
parent | 0f950dcd0dfb65d484346606943d08b9529d61bd (diff) |
Changes to valid format for usernames.
Diffstat (limited to 'users')
-rw-r--r-- | users/app/models/user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb index e41c2dc..b6e2bad 100644 --- a/users/app/models/user.rb +++ b/users/app/models/user.rb @@ -19,8 +19,8 @@ class User < CouchRest::Model::Base :if => :serverside? validates :login, - :format => { :with => /\A[A-Za-z\d_\.]+\z/, - :message => "Only letters, digits, . and _ allowed" } + :format => { :with => /\A[a-z][a-z\d_\.-]*[a-z\d]\z/, + :message => "Only lowercase letters, digits, . - and _ allowed. Login must have at least 2 characters, and begin with a letter, and end with a letter or digit" } validate :login_is_unique_alias |