Sha256: cecaa0754500436e6e668fb6994249edc25949a6713ba43353e848f2eba067cf
Contents?: true
Size: 670 Bytes
Versions: 13
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module Decidim module Verifications module IdDocuments # A form object to be used when public users want to get verified by # uploading their identity documents. class UploadForm < InformationForm mimic :id_document_upload attribute :verification_attachment, String validates :verification_attachment, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } }, file_content_type: { allow: ["image/jpeg", "image/png"] }, presence: true, if: :uses_online_method? end end end end
Version data entries
13 entries across 13 versions & 1 rubygems