Is it Possible to Set a Maximum Longevity on an Array Schema Type?

1 replies
Last updated: Sep 19, 2022
Hey! Is it possible to set a max length on an array schema type?
It is possible, yes. You can set
min
,
max
, or
length
requirements as part of the
Validation
. The array schema type documentation has some examples.

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?