POST

Validate Submission


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Note: The Form Submission service plugin only works with the Wix Forms app. Call GetAppInstance to confirm that the app named wix_forms is installed on the site.


Validates a submission.
Validates a site visitor's form submission and returns any validation violations.
Site visitors can see the validation violations on their forms. For example, invalid fields are highlighted in red.

Permissions
Manage Submissions
Learn more about app permissions.
Endpoint
POST
{DEPLOYMENT-URI}/v4/submissions/validate
Body Params
submissionSubmissionRequired

Submission to validate.


actionTypestringRequired

Whether to create or update the submission.


updateOptionsUpdateOptions

Data for updating an existing submission.

Response Object
errorsArray <SubmissionValidationError>maxItems 100

List of validation errors.
If there are no validation errors, returns an empty array.

Validate submission
Request
cURL
curl -X POST \ 'http://www.wixapis.com/form-submission/v4/submissions/validate' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ -d '{ "submission": { "id": "e62e3011-55cf-4de3-a497-e097b52d86b7", "formId": "e62e3011-55cf-4de3-a497-e097b52d86b8", "namespace": "wix.form_app.form", "status": "PENDING", "submissions": { "first_name": "J0hn", "last_name": "Doe" "fiend_list": ["Tom", "Sally", "Bob"] }, "submitter": { "memberId": "4b42fb49-8c77-4128-859c-8247756f68ef" }, "seen": false, "revision": 1, "createdDate": "2019-10-30T17:22:10.299Z", "updatedDate": "2019-10-30T17:22:10.299Z" }, "actionType": "CREATE", "createOptions": {} }'
Response
JSON
{ "validationResult": { "errors": [ { "errorPath": "first_name", "params": {}, "errorType": "TYPE_ERROR" }, { "errorPath": "fiend_list/2", "params": {}, "custom_error_message": "Bob is not a friend" } ] } }
Did this help?