🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Issue with validation for mailto in Slack thread

4 replies
Last updated: Apr 25, 2024
Hi there 👋Has anyone encountered a similar problem? It seems that validation for mailto is not working correctly


 validation: (Rule) => Rule.required().uri({scheme: ['http', 'https', 'tel', 'mailto']}),
Apr 12, 2024, 9:48 AM
I can’t seem to reproduce the error. What error text do you see when you hover over the red
?
in the circle? Can you please copy and paste the exact URL string you’re using (starting with
mailto:?body...
above)? If you take out the unescaped
?
after
care
, does the error persist?
Apr 17, 2024, 8:12 PM
I assume this is schema type of
url
, but had better confirm.
Apr 17, 2024, 8:21 PM
user A
Thanks for your time)
Turns out I was just editing the wrong schemа
:melting_face:But it took me a long time to figure it out
🥲
Apr 25, 2024, 3:30 PM
Ah! Glad you got it figured out! 🎉
Apr 25, 2024, 3:31 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?