You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can probably use this in ValidatedTextInput to automatically provide a default for the label prop so it will render the schema's label if the consumer doesn't pass one in.
The text was updated successfully, but these errors were encountered:
Currently, to get nice-looking validation errors we have to repeat all our field labels in two places: in the schema and on the form field itself.
Looking at the TS types for
yup
, we should be able to grab the label set in the schema'slabel()
method by looking atschema.spec.label
: https://github.com/jquense/yup/blob/master/src/schema.ts#L42We can probably use this in ValidatedTextInput to automatically provide a default for the
label
prop so it will render the schema's label if the consumer doesn't pass one in.The text was updated successfully, but these errors were encountered: