用户注册lastname超长报错

This commit is contained in:
linhk 2014-08-05 17:13:50 +08:00
parent 3862f857f7
commit d8964d81a8
1 changed files with 1 additions and 0 deletions

View File

@ -174,6 +174,7 @@ class User < Principal
validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\z/i
validates_length_of :login, :maximum => LOGIN_LENGTH_LIMIT
validates_length_of :firstname, :maximum => 30
validates_length_of :lastname, :maximum => 30
validates_format_of :mail, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :allow_blank => true
validates_length_of :mail, :maximum => MAIL_LENGTH_LIMIT, :allow_nil => true
validates_confirmation_of :password, :allow_nil => true