diff options
Diffstat (limited to 'users/app/models')
-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 |