Making note section mandatory (cart attributes) not working!

Topic summary

A user successfully resolved an issue where a required cart attribute field (note for enclosure card) wasn’t enforcing validation at checkout.

Solution Found:

  • Remove the novalidate attribute from the cart form’s opening <form> tag
  • The attribute prevents HTML5 required field validation from working
  • One user noted they also needed to apply this fix to ajax-cart-template.liquid for it to work properly

Additional Discussion:

  • A follow-up question asked about customizing the “Please fill in this field” error message text
  • Response indicated this can be changed through Shopify’s default theme settings: Online Store → Theme → Edit Default Theme Content → Sections → Cart → find the Note label

The thread appears resolved with the original poster finding their own solution and others confirming it worked for similar issues.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

Hey team!

I am adding this to the cart:

Note for Enclosure Card (if not applicable type N/A) {{ cart.attributes["Note for Enclosure Card (if not applicable type N/A)"] }}

All is well, Except - it is still allowing me to go through to the checkout even when the field is blank! So the mandatory isn’t working.

(theme: debut)

Any suggestions?

Nevermind! Sorted it out on my own!

If you set your form field to be required, then you will need to remove the novalidate attribute from the checkout form. Find novalidate, which is inside the opening tag. The code might look something like this:

Delete novalidate:

1 Like

Thank you for posting the solution! I just had the same problem and this solved it for me as well.

Hi, I tried the solution and it only worked when I also applied the code to the ajax-cart-template.liquid. Is this something that you also had to do? Just wondering…

Any feedback would be appreciated. Thank you

Hello, That worked great! Thank you. Do you know how can we change the text which appears : “Please fill in this field” as it is not from the Edit default theme content..

You can change the text of the note field within the default theme settings. From the main Shopify page, click “Online Store”, then the “…” button next to the “Customize” button for your theme. Then "Edit Default Theme Content. Then click on “Sections” and scroll down till you find the label for “Note” in the Cart section and edit the text.