Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Can't Enter 0 into the Number Field even with Custom Rules

4 replies
Last updated: Feb 11, 2021
Hello, for some reason we can't enter 0 into the number field. I've tried setting custom Rules for positive() and min(0) to no avail.
Am I missing anything.
Feb 3, 2021, 12:46 AM
No, you’re not missing anything. It’s a long-standing issue with the input field of type
number
(so this is not a Sanity issue). For what it’s worth, the value of 0 is stored, but it can definitely be confusing for a user who doesn’t know that.
Feb 3, 2021, 3:57 AM
That sucks, thank you for the details!
Feb 3, 2021, 9:08 PM
Hi
user H
. Turns out this was a bug and will be fixed in an upcoming release. https://sanity-io-land.slack.com/archives/C9Z7RC3V1/p1613061958176900
Feb 11, 2021, 7:49 PM
Thanks Geoff!
Feb 11, 2021, 7:53 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?