真实姓名和昵称长度限制增加到30

dev_hjm
daiao 6 years ago
parent 781cdc129d
commit f946312abd

@ -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

Loading…
Cancel
Save