# Server side validation function not blocking checkout

**URL:** <https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048>\
**Category:** Functions\
**Tags:** cart-validation\
**Created:** [June 10, 2025, 9:09pm UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048 "2025-06-10T21:09:54Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![MadWizard](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/madwizard/32/139_2.png) [@MadWizard](https://community.shopify.dev/u/MadWizard)\
**Post date:** [June 10, 2025, 9:09pm UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/1 "2025-06-10T21:09:55Z")

</div>

I’ve got the code running in my dev store and the one live store it’s for. I used the code at

> **[Create a server-side validation function](https://shopify.dev/docs/apps/build/checkout/cart-checkout-validation/create-server-side-validation-function)**
>
> Use Shopify Functions to block completing an order when the cart line quantities exceed a limit.

For the base. Main thing I changed is the interior logic for when to report an error (set to only run on the checkout page).

It runs, it reports the error, the message shows on checkout, but it still lets you check out. I was pretty sure this worked before but now it’s not. What am I missing? I can post chunks of code if it helps but it’s pretty close to that example with only when to report an error changed and that’s working.

---

<div class="post-metadata">

**Author:** ![MadWizard](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/madwizard/32/139_2.png) [@MadWizard](https://community.shopify.dev/u/MadWizard)\
**Post date:** [June 12, 2025, 2:55pm UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/2 "2025-06-12T14:55:08Z")

</div>

Well so far no luck finding a solution (sort of). I tried the example again and had the same issue, not blocking checkout. BUT I found it does work if you go to the 3 page checkout. It’s not ideal but at least functions. I was really hoping someone had a fix or at least could see if any others have found this happening (happened in our sandbox dev store and the live store)

---

<div class="post-metadata">

**Author:** ![chunky](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@chunky](https://community.shopify.dev/u/chunky)\
**Post date:** [June 15, 2025, 1:23pm UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/3 "2025-06-15T13:23:41Z")

</div>

same thing happens on our dev store, the error message pops up, but we are able to checkout

---

<div class="post-metadata">

**Author:** ![Liam-Shopify](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/liam-shopify/32/6_2.png) [@Liam-Shopify](https://community.shopify.dev/u/Liam-Shopify)\
**Post date:** [June 16, 2025, 10:11am UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/4 "2025-06-16T10:11:24Z")

</div>

Hey folks - thanks for flagging issues with this tutorial. Digging into this on my side now.

---

<div class="post-metadata">

**Author:** ![Liam-Shopify](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/liam-shopify/32/6_2.png) [@Liam-Shopify](https://community.shopify.dev/u/Liam-Shopify)\
**Post date:** [June 16, 2025, 5:50pm UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/5 "2025-06-16T17:50:47Z")

</div>

Are your dev stores using the the Checkout and Customer Accounts Extensibility developer preview?

---

<div class="post-metadata">

**Author:** ![MadWizard](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/madwizard/32/139_2.png) [@MadWizard](https://community.shopify.dev/u/MadWizard)\
**Post date:** [June 16, 2025, 6:30pm UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/6 "2025-06-16T18:30:06Z")

</div>

My dev store that I tested on, yes. It also didn’t work on what is now a live Plus store.

---

<div class="post-metadata">

**Author:** ![Liam-Shopify](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/liam-shopify/32/6_2.png) [@Liam-Shopify](https://community.shopify.dev/u/Liam-Shopify)\
**Post date:** [June 17, 2025, 8:43am UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/7 "2025-06-17T08:43:20Z")

</div>

Looking into this more on my side now.

---

<div class="post-metadata">

**Author:** ![Tobias\_Dierich](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@Tobias\_Dierich](https://community.shopify.dev/u/Tobias_Dierich)\
**Post date:** [June 25, 2025, 10:36am UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/8 "2025-06-25T10:36:51Z")

</div>

Hey 👋 We also have a validation function running on a plus production store. The validaton error shows during checkout but I can still checkout, however, only with certain payment methods. I am pretty sure it worked before, and we didn’t change anything in our function (has been running for half a year already).

We are validating that a phone number is provided for certain shipping methods. Checkout shows me that the phone number is required when I don’t enter anything. So far so good. If I select checkout with paypal, it opens the paypal popup but immediately closes it and shows an error (translated):

> There has been a problem with Buy with PayPal. Return to the shop to try again, or check out using a different method.

If I enter a phone number, checkout with paypal works as usual.

If I checkout with Klarna or PayPal Express, the validation error is completely ignored and I can checkout.

---

<div class="post-metadata">

**Author:** ![MadWizard](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/madwizard/32/139_2.png) [@MadWizard](https://community.shopify.dev/u/MadWizard)\
**Post date:** [July 3, 2025, 9:03pm UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/9 "2025-07-03T21:03:05Z")

</div>

Just checking if you’d had any update @Liam-Shopify . Or at least if you are able to confirm the issue isn’t just us? XD

---

<div class="post-metadata">

**Author:** ![Liam-Shopify](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/liam-shopify/32/6_2.png) [@Liam-Shopify](https://community.shopify.dev/u/Liam-Shopify)\
**Post date:** [July 10, 2025, 11:37am UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/10 "2025-07-10T11:37:46Z")

</div>

It does look like this is an issue that is affecting one page checkout which is being experienced by some devs - we’re still looking into this.

---

<div class="post-metadata">

**Author:** ![Patrick\_Jakubik](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/patrick_jakubik/32/16579_2.png) [@Patrick\_Jakubik](https://community.shopify.dev/u/Patrick_Jakubik)\
**Post date:** [July 22, 2025, 10:06am UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/12 "2025-07-22T10:06:52Z")

</div>

Possibly related? [Validation functions don't run in small % of cases - #6 by Patrick\_Jakubik](https://community.shopify.dev/t/validation-functions-dont-run-in-small-of-cases/19412/6)

---

<div class="post-metadata">

**Author:** ![Tien\_Nghiem](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@Tien\_Nghiem](https://community.shopify.dev/u/Tien_Nghiem)\
**Post date:** [September 24, 2025, 2:47am UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/13 "2025-09-24T02:47:25Z")

</div>

Any update on this issue, @Liam-Shopify ? I can’t block the “Pay Now” button when an error message appears on OnePage Checkout.

---

<div class="post-metadata">

**Author:** ![Erin\_Wilder](https://avatars.discourse-cdn.com/v4/letter/e/e56c9b/32.png) [@Erin\_Wilder](https://community.shopify.dev/u/Erin_Wilder)\
**Post date:** [May 27, 2026, 5:06pm UTC](https://community.shopify.dev/t/server-side-validation-function-not-blocking-checkout/17048/14 "2026-05-27T17:06:38Z")

</div>

@Liam-Shopify Wanted to follow up on this. I know it’s an old post, but I am experiencing this issue on my one-page checkout also. Server-side checkout rules do not block checkout, but checkout extensions do. However, because those are not server-side, people are able to bypass it still. We have been having bots exploit our gift-with-purchase promotions and the best solution would be a server-side checkout rule. We already developed one, but it only works with 3-page checkout and one-page checkout has given us a measurable bump in conversions that I don’t want to sacrifice.
