Can a custom validation rule in Sanity trigger multiple times when editing a document?

3 replies
Last updated: Mar 14, 2024
Hi. I see that a custom validation rule may be triggered several times when edditting a document.
Is it ok to have a
client.fetch
inside the custom validation rule of a document?

dumb question: Does it count as API Request?
Mar 14, 2024, 12:06 AM
Nope! Calls from inside the Studio do not count toward your quota.
Mar 14, 2024, 12:07 AM
Thanks
user M
.
Mar 14, 2024, 12:08 AM
You’re welcome!
Mar 14, 2024, 12:08 AM

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?