Sanity: Unsuccessfully validating fields in the Studio should only yell at you *after* they lose focus

Created on 17 Feb 2019  路  1Comment  路  Source: sanity-io/sanity

Is your feature request related to a problem? Please describe.
Currently when any field in the Studio has validation set up, a warning/error is flagged continuously until the field validates. This is generally a bit too aggressive, as often you have just not finished typing yet (for example when a field expecting an email address gets all flouncey and offended because you have only got as far as foo@bar and haven't yet typed the .com part of the address)

Describe the solution you'd like
It would be nice if validating fields only yelled at you after the field has lost focus (i.e. you're presumably done typing). So to recap, field gets focus: validation not yet active. Field loses focus: validation happens, and yells at you when appropriate.

Describe alternatives you've considered
It's possible there are cases when a field in the Studio should continually validate, though I can't immediately think of any. But it would be worth asking other users.

Additional context
Screenshot with example skjermbilde 2019-02-17 kl 17 04 50

Bug Studio Validation

Most helpful comment

I support this. This also goes for validation of arrays of objects within document types if validation is used. In this case, when you click "Add" to create a new inlined object, ALL the fields in the object start out red, which doesn't feel very friendly.

Another scenario I face is creating empty documents for others to edit, where we need to create the document up front to assign access rights to it. As we leave the fields themselves empty, the poor editor assigned to fill out the document starts off with ALL the fields in the entire document being red.

Reversing the UI pattern somehow by for example showing green tick marks on validated fields might feel more friendly.

>All comments

I support this. This also goes for validation of arrays of objects within document types if validation is used. In this case, when you click "Add" to create a new inlined object, ALL the fields in the object start out red, which doesn't feel very friendly.

Another scenario I face is creating empty documents for others to edit, where we need to create the document up front to assign access rights to it. As we leave the fields themselves empty, the poor editor assigned to fill out the document starts off with ALL the fields in the entire document being red.

Reversing the UI pattern somehow by for example showing green tick marks on validated fields might feel more friendly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

camjc picture camjc  路  4Comments

maxmoeschinger picture maxmoeschinger  路  5Comments

evenwestvang picture evenwestvang  路  3Comments

readeral picture readeral  路  4Comments

hmngwy picture hmngwy  路  3Comments