validation Create
Requires access scope.
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.
Arguments
- validation (ValidationCreateInput!)
- Anchor to validationvalidation•Validation
Create Input! required The input fields for a new validation.
- userErrors ([ValidationUserError!]!)
- validation (Validation)
- Anchor to userErrorsuser•[Validation
Errors User Error!]! non-null The list of errors that occurred from executing the mutation.
- Anchor to validationvalidation•Validation
The created validation.