@@ -54,7 +54,7 class User < ActiveRecord::Base | |||||
54 | # Login must contain lettres, numbers, underscores only |
|
54 | # Login must contain lettres, numbers, underscores only | |
55 | validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i |
|
55 | validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i | |
56 | validates_length_of :login, :maximum => 30 |
|
56 | validates_length_of :login, :maximum => 30 | |
57 | validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-]*$/i |
|
57 | validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-\.]*$/i | |
58 | validates_length_of :firstname, :lastname, :maximum => 30 |
|
58 | validates_length_of :firstname, :lastname, :maximum => 30 | |
59 | validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true |
|
59 | validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true | |
60 | validates_length_of :mail, :maximum => 60, :allow_nil => true |
|
60 | validates_length_of :mail, :maximum => 60, :allow_nil => true |
General Comments 0
You need to be logged in to leave comments.
Login now