summaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index a82c98a88..0287006c6 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -32,7 +32,8 @@ class User < ActiveRecord::Base
validates_presence_of :login, :firstname, :lastname, :mail
validates_uniqueness_of :login, :mail
# Login must contain lettres, numbers, underscores only
- validates_format_of :login, :with => /^[a-z0-9_]+$/i
+ validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-]*$/i
+ validates_format_of :login, :with => /^[a-z0-9_\-@\.]+$/i
validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
# Password length between 4 and 12
validates_length_of :password, :in => 4..12, :allow_nil => true