Skip to main content
object

Requires read_validations access scope.

An error that occurs during the execution of a validation mutation.

•ValidationUserErrorCode

The error code.

•[String!]

The path to the input field that caused the error.

•String!
non-null

The error message.


Was this section helpful?

•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 functionId or functionHandle.

Use validationCreate 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 blockOnFailure field controls whether runtime exceptions, such as timeouts, also block checkout.

Arguments

•ValidationCreateInput!
required

The input fields for a new validation.


•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.

Arguments

•ID!
required

The ID representing the installed validation.


•mutation

Updates a cart and checkout validation. Use validationUpdate to rename it, toggle whether it's enabled at checkout, change its blockOnFailure behavior, or update its metafields.

Validation errors always block checkout progress. The blockOnFailure field controls whether runtime exceptions, such as timeouts, also block checkout.

Arguments

•ID!
required

The ID representing the validation to update.

•ValidationUpdateInput!
required

The input fields to update a validation.



Was this section helpful?


Was this section helpful?