rjsf-team/react-jsonschema-form

liveValidate should optionally not validate "pristine" fields (at least until a submit)

Open

#512 ouverte le 14 mars 2017

Voir sur GitHub
 (31 commentaires) (24 réactions) (0 assignés)TypeScript (2 136 forks)batch import
featurehelp wanted

Métriques du dépôt

Stars
 (13 175 stars)
Métriques de merge PR
 (Merge moyen 3j 17h) (32 PRs mergées en 30 j)

Description

Prerequisites

  • I have read the documentation;
  • In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.

Description

In the playground, the "Validation" tab, when live validation is enabled, starts with an error ("passwords don't match"). However, the user hasn't put in a password yet, so it doesn't make sense as part of the user experience to show this error, at least until they start typing in the field.

Similarly, in the "Errors" tab, the initial state shows a bunch of errors. However, for some user experiences, this doesn't seem necessary or helpful; we're telling the user about errors that pre-existed, not errors they themselves have made.

Per https://github.com/mozilla-services/react-jsonschema-form/issues/246#issuecomment-286277405, maybe we should not validate fields until they've been "touched" somehow.

Guide contributeur