From d8964d81a845d8c604c3995344289cf167c7881a Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Tue, 5 Aug 2014 17:13:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8Clastname?= =?UTF-8?q?=E8=B6=85=E9=95=BF=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/user.rb b/app/models/user.rb index b64d0efd7..78bfc75f0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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