From f946312abdfeaed4fdb241b2b263f98a6b0d93d0 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 5 Aug 2019 18:03:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=9C=9F=E5=AE=9E=E5=A7=93=E5=90=8D?= =?UTF-8?q?=E5=92=8C=E6=98=B5=E7=A7=B0=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=B030?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/forms/users/update_account_form.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/forms/users/update_account_form.rb b/app/forms/users/update_account_form.rb index 16c3c8013..2a75a7d87 100644 --- a/app/forms/users/update_account_form.rb +++ b/app/forms/users/update_account_form.rb @@ -5,8 +5,8 @@ class Users::UpdateAccountForm attr_accessor :nickname, :name, :show_realname, :gender, :location, :location_city, :identity, :student_id, :technical_title, :school_id, :department_id - validates :nickname, presence: true, length: { maximum: 20 } - validates :name, presence: true, length: { maximum: 10 } + validates :nickname, presence: true, length: { maximum: 30 } + validates :name, presence: true, length: { maximum: 30 } validates :gender, presence: true, numericality: { only_integer: true }, inclusion: { in: [0, 1] } validates :location, presence: true validates :location_city, presence: true From d04c4c306d861794cf9e5840ba31a24fc26182eb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 5 Aug 2019 18:10:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=A7=93=E5=90=8D?= =?UTF-8?q?=E5=92=8C=E6=98=B5=E7=A7=B0=E9=AA=8C=E8=AF=81=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/forms/users/update_account_form.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/forms/users/update_account_form.rb b/app/forms/users/update_account_form.rb index 2a75a7d87..16c3c8013 100644 --- a/app/forms/users/update_account_form.rb +++ b/app/forms/users/update_account_form.rb @@ -5,8 +5,8 @@ class Users::UpdateAccountForm attr_accessor :nickname, :name, :show_realname, :gender, :location, :location_city, :identity, :student_id, :technical_title, :school_id, :department_id - validates :nickname, presence: true, length: { maximum: 30 } - validates :name, presence: true, length: { maximum: 30 } + validates :nickname, presence: true, length: { maximum: 20 } + validates :name, presence: true, length: { maximum: 10 } validates :gender, presence: true, numericality: { only_integer: true }, inclusion: { in: [0, 1] } validates :location, presence: true validates :location_city, presence: true