|
|
|
@ -7,7 +7,7 @@ class Users::ApplyProfessionalAuthForm
|
|
|
|
|
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
|
|
|
|
|
validates :validate_attachment_ids
|
|
|
|
|
validate :validate_attachment_ids
|
|
|
|
|
|
|
|
|
|
def validate_attachment_ids
|
|
|
|
|
unless attachment_ids.is_a?(Array) || attachment_ids.length != 1
|
|
|
|
|