认证图片调整

issues25489
cxt 5 years ago
parent 0d72df0e5c
commit 9c722933ba

@ -1,10 +1,11 @@
class Users::ApplyAuthenticationForm
include ActiveModel::Model
attr_accessor :name, :id_number, :gender, :upload_image
attr_accessor :name, :id_number, :gender, :upload_image, :attachment_ids
validates :name, presence: true
validate :validate_ID_number
validates :attachment_ids, presence: true
def validate_ID_number

@ -1,10 +1,11 @@
class Users::ApplyProfessionalAuthForm
include ActiveModel::Model
attr_accessor :school_id, :department_id, :identity, :extra, :upload_image
attr_accessor :school_id, :department_id, :identity, :extra, :upload_image, :attachment_ids
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
validates :attachment_ids, presence: true
end
Loading…
Cancel
Save