diff --git a/app/forms/users/update_account_form.rb b/app/forms/users/update_account_form.rb index d82459fcf..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 - validates :name, presence: true + 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