You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
471 B
10 lines
471 B
5 years ago
|
class Users::ApplyProfessionalAuthForm
|
||
|
include ActiveModel::Model
|
||
|
|
||
|
attr_accessor :school_id, :department_id, :identity, :extra, :upload_image
|
||
|
|
||
|
validates :school_id, presence: true, numericality: { only_integer: true, greater_than: 0 }
|
||
|
validates :department_id, numericality: { only_integer: true, greater_than: 0 }, allow_blank: true
|
||
|
validates :identity, presence: true, inclusion: { in: %w(student teacher professional) }
|
||
|
validates :extra, presence: true
|
||
|
end
|