docusealco/docuseal · error · Submitters::SubmitValues::ValidationError
Missing field
Error message
Missing field
What it means
Raised by Submitters::SubmitValues.validate_value! (via validate_values!) when the submitted values hash contains a key that matches no field UUID in submitter.submission.template_fields. Every key of values must be a template field UUID known to the submission.
Source
Thrown at lib/submitters/submit_values.rb:501
phone = value.gsub(/[^+\d]/, '')
end
next if email.blank? && phone.blank?
submission.submitters.create!(uuid: s['uuid'], email:, phone:, account_id: submitter.account_id)
SubmissionEvents.create_with_tracking_data(submitter, 'invite_party', request, { uuid: submitter.uuid })
is_invited = true
end
submission.update!(submitters_order: :preserved) if is_invited
submitter
end
def validate_value!(_value, field, _params, submitter, _request)
raise ValidationError, 'Missing field' unless field
raise ValidationError, 'Invalid field' if field['submitter_uuid'] != submitter.uuid
if field['readonly'] == true
Rollbar.warning("Readonly field #{submitter.id}: #{field['uuid']}") if defined?(Rollbar)
raise ValidationError, 'Read-only field'
end
true
end
end
end
View on GitHub (pinned to 004a22c1c8)
Solutions
- Refetch the submission's template fields and rebuild the values payload so every key is a current field UUID
- Slice the values hash to known field UUIDs and drop/log unknown keys before submitting
- If the field should exist, restore or re-add it to the template instead of resubmitting the stale UUID
Example fix
# before
values = { 'removed_field_uuid' => 'x', 'valid_field_uuid' => 'y' }
Submitters::SubmitValues.update_submitter!(submitter, { values: values }, request) # raises 'Missing field'
# after
known = submitter.submission.template_fields.map { |f| f['uuid'] }
Submitters::SubmitValues.update_submitter!(submitter, { values: values.slice(*known) }, request) Defensive patterns
Strategy: validation
Validate before calling
known = submitter.submission.template_fields.map { |f| f['uuid'] }
unknown = values.keys - known
raise ArgumentError, "unknown field uuids: #{unknown.join(', ')}" if unknown.any?
values = values.slice(*known) Type guard
def known_field?(uuid, submission) submission.fields_uuid_index.key?(uuid) end
Try / catch
begin
Submitters::SubmitValues.call(submitter, params, request)
rescue Submitters::SubmitValues::ValidationError => e
# e.message == 'Missing field' -> values contained a uuid not on the template
render json: { error: e.message }, status: :unprocessable_entity
end Prevention
- Always build value keys from a fresh read of the submission's template_fields, never from a cached copy
- Validate keys against the field list before submit and log dropped keys
- After editing a template, invalidate client-side field caches
When it happens
Trigger: Submitting values whose keys include a UUID that is not in template_fields — a field deleted from the template, a typo'd/truncated UUID, or a wrong identifier type (submitter UUID, attachment UUID, field area UUID) used as a value key.
Common situations: Client cached an older template version and posts fields that were since removed or regenerated; a submission was re-created from an updated template so UUIDs changed; automation copies value keys between environments/templates; key silently mangled during serialization.
Related errors
- Invalid field
- Read-only field
- ID Not Verified
- Formula infinite loop
- Templates::ModifyDocuments::InvalidLayout
AI-assisted analysis of docusealco/docuseal@004a22c1c8 (2026-08-21).
Data as JSON: /api/errors/44095c61e1d37151.
Report an issue: GitHub.