Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I have some questions to community maybe someone meet those and already make some patterns for it.
First one is about JSON validation any one knows how it works ? In my feelings it doesnt respect any type of JSON validations.
Second is about making validations / some patterns for list referances. What if i want to do list with limited entries? Did someone have some ideas how to resolve that?
Have a nice day ! 🙂
Solved! Go to the solution
This is an accepted solution.
Per the allowed validations: https://shopify.dev/docs/api/admin-graphql/unstable/queries/metafieldDefinitionTypes#examples-Fetch_...
You can have a max or minimum on a any list. type. Although it must be added through the API. For example list.metaobjects:
{ "name": "test2", "key": "test_2", "type": "list.metaobject_reference", "validations": [ { "name": "list.max", "value": "2" } ] }
For the JSON validations see: https://www.liquid-technologies.com/online-json-schema-validator
And: https://json-schema.org/learn/miscellaneous-examples.html
Bumping.
This is an accepted solution.
Per the allowed validations: https://shopify.dev/docs/api/admin-graphql/unstable/queries/metafieldDefinitionTypes#examples-Fetch_...
You can have a max or minimum on a any list. type. Although it must be added through the API. For example list.metaobjects:
{ "name": "test2", "key": "test_2", "type": "list.metaobject_reference", "validations": [ { "name": "list.max", "value": "2" } ] }
For the JSON validations see: https://www.liquid-technologies.com/online-json-schema-validator
And: https://json-schema.org/learn/miscellaneous-examples.html
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025