Validation User Error
Requires access scope.
An error that occurs during the execution of a validation mutation.
Anchor to FieldsFields
- code (ValidationUserErrorCode)
- field ([String!])
- message (String!)
- Anchor to codecode•Validation
User Error Code The error code.
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Anchor to MutationsMutations
- validationCreate (ValidationCreatePayload)
- validationDelete (ValidationDeletePayload)
- validationUpdate (ValidationUpdatePayload)
- •mutation
Creates a cart and checkout validation: a server-side rule enforced before a customer can complete checkout. Each validation is powered by a cart and checkout validation function that you provide using
or.Use
to apply custom rules at checkout, such as limiting item quantities, enforcing order minimums or maximums, or blocking checkout for restricted shipping addresses. Validations run on Shopify's servers and are enforced throughout checkout, so they can't be bypassed by the client.Validation errors always block checkout progress. The
field controls whether runtime exceptions, such as timeouts, also block checkout.- Anchor to validationvalidation•Validation
Create Input! required The input fields for a new validation.
Arguments
- •mutation
Deletes a cart and checkout validation, removing its rule from the shop's checkout. Once deleted, its cart and checkout validation function no longer runs during checkout.
- •ID!required
The ID representing the installed validation.
Arguments
- •ID!
- •mutation
Updates a cart and checkout validation. Use
to rename it, toggle whether it's enabled at checkout, change itsbehavior, or update its metafields.Validation errors always block checkout progress. The
field controls whether runtime exceptions, such as timeouts, also block checkout.- •ID!required
The ID representing the validation to update.
- Anchor to validationvalidation•Validation
Update Input! required The input fields to update a validation.
Arguments
- •ID!