|
|
@ -5,8 +5,8 @@ class Users::UpdateAccountForm
|
|
|
|
attr_accessor :nickname, :name, :show_realname, :gender, :location, :location_city,
|
|
|
|
attr_accessor :nickname, :name, :show_realname, :gender, :location, :location_city,
|
|
|
|
:identity, :student_id, :technical_title, :school_id, :department_id
|
|
|
|
:identity, :student_id, :technical_title, :school_id, :department_id
|
|
|
|
|
|
|
|
|
|
|
|
validates :nickname, presence: true
|
|
|
|
validates :nickname, presence: true, length: { maximum: 20 }
|
|
|
|
validates :name, presence: true
|
|
|
|
validates :name, presence: true, length: { maximum: 10 }
|
|
|
|
validates :gender, presence: true, numericality: { only_integer: true }, inclusion: { in: [0, 1] }
|
|
|
|
validates :gender, presence: true, numericality: { only_integer: true }, inclusion: { in: [0, 1] }
|
|
|
|
validates :location, presence: true
|
|
|
|
validates :location, presence: true
|
|
|
|
validates :location_city, presence: true
|
|
|
|
validates :location_city, presence: true
|
|
|
|