docusealco/docuseal · error · Submitters::SubmitValues::ValidationError

ID Not Verified

Error message

ID Not Verified

What it means

Raised by Submitters::SubmitValues.merge_default_values while completing a submission (params[:completed] == 'true'). For every template field of type 'verification' belonging to this submitter, the code requires an existing 'complete_verification' submission event; if the field is required and no such event exists, completion is refused with 'ID Not Verified'.

Source

Thrown at lib/submitters/submit_values.rb:189

      default_values = submitter.submission.template_fields.each_with_object({}) do |field, acc|
        next if field['submitter_uuid'] != submitter.uuid

        if field['type'] == 'stamp'
          acc[field['uuid']] ||=
            Submitters::CreateStampAttachment.build_attachment(
              submitter,
              with_logo: field.dig('preferences', 'with_logo') != false
            ).uuid

          next
        end

        if field['type'] == 'verification' && with_verification
          acc[field['uuid']] =
            if submitter.submission_events.exists?(event_type: :complete_verification)
              I18n.t(:verified, locale: :en)
            elsif field['required']
              raise ValidationError, 'ID Not Verified'
            end

          next
        end

        value = field['default_value']

        next if value.blank?

        acc[field['uuid']] = template_default_value_for_submitter(value, submitter, field:, with_time: true)
      end

      default_values.compact_blank.merge(submitter.values)
    end

    def build_formula_values(submitter)
      submission_values = nil

View on GitHub (pinned to 004a22c1c8)

Solutions

  1. Drive the submitter through the ID verification flow so a complete_verification submission event exists before completing the form
  2. Submit without completed=true first, complete verification, then submit again with completed=true
  3. If verification must not block completion, edit the template and set the verification field's required to false
  4. Audit submission_events for the submitter to confirm whether the verification event is missing or mis-typed

Example fix

# before
Submitters::SubmitValues.call(submitter, { values: values, completed: 'true' }, request) # raises 'ID Not Verified'
# after
unless submitter.submission_events.exists?(event_type: :complete_verification)
  redirect_to verification_flow_path and return # complete verification first
end
Submitters::SubmitValues.call(submitter, { values: values, completed: 'true' }, request)
Defensive patterns

Strategy: validation

Validate before calling

needs_verification = submitter.submission.template_fields.any? do |f|
  f['submitter_uuid'] == submitter.uuid && f['type'] == 'verification' && f['required']
end
verified = submitter.submission_events.exists?(event_type: :complete_verification)
# guard: don't send completed=true until (needs_verification ? verified : true)

Try / catch

begin
  Submitters::SubmitValues.call(submitter, params, request)
rescue Submitters::SubmitValues::ValidationError => e
  render json: { error: e.message }, status: :unprocessable_entity if e.message == 'ID Not Verified'
end

Prevention

When it happens

Trigger: Calling submit with completed='true' when the template has a required verification field for this submitter and submitter.submission_events has no event_type: :complete_verification record (the ID verification step was never finished or its event was never written).

Common situations: A signer skips or fails the ID verification step and the client still posts completed=true; an integration submits directly via API bypassing the verification flow; the verification event was lost (job failure, event_type typo) so even verified users cannot complete; template authored with verification required by mistake.

Related errors


AI-assisted analysis of docusealco/docuseal@004a22c1c8 (2026-08-21). Data as JSON: /api/errors/de5f44f17b0bb928. Report an issue: GitHub.