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
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025