Sha256: 8f598071d1d3ea32decea9aa271a0266bd03ac01c8dd71cb9275bb137ed8f494

Contents?: true

Size: 626 Bytes

Versions: 28

Compression:

Stored size: 626 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
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
decidim-verifications-0.15.2 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.15.1 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.15.0 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.14.4 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.14.3 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.14.2 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.14.1 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.13.1 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.12.2 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.13.0 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.12.1 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.13.0.pre1 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.12.0 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.11.2 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.12.0.pre app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.11.1 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.11.0.pre1 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.10.1 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.10.0 app/forms/decidim/verifications/id_documents/upload_form.rb
decidim-verifications-0.9.3 app/forms/decidim/verifications/id_documents/upload_form.rb