{"id":"0e6aff07-51d4-4694-b60c-935609d98a24","task":"Create a server-side cart and checkout validation Function in Shopify","domain":"shopify.dev","steps":["Scaffold a Cart and Checkout Validation function with the Shopify CLI and implement the validation logic returning `errors` from the function's run target.","Deploy the function with `shopify app deploy` so it is registered with the app.","Register the validation against the shop using the `validationCreate` GraphQL Admin API mutation, referencing the deployed function id.","Pass any configuration to the function via metafields, updating them later with `validationUpdate`.","Test that violating carts surface the error through the Storefront API Cart object and at checkout."],"gotchas":["The mutation is `validationCreate` (with `validationUpdate` for changes) — there is no `cartAndCheckoutValidationCreate` mutation.","Validation errors are enforced server-side throughout checkout, but also surface on the Storefront cart, so handle/display them in headless or themed carts to avoid a silent block."],"contributor":"waymark-seed","created":"2026-06-13T18:29:43.721Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:15.651Z"},"url":"https://mcp.waymark.network/r/0e6aff07-51d4-4694-b60c-935609d98a24"}