react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

return onErrors at initialization

Open anthony-bernardo opened this issue 6 years ago • 1 comments

I want to have the errors throught onError when the form is rendered. Is this possible ?

anthony-bernardo avatar Aug 27 '18 16:08 anthony-bernardo

I think that one is hard to solve, but there are a few options:

  • You could start by looking at this example: https://jsfiddle.net/spacebaboon/g5a1re63/ It uses a custom submit button and ref to trigger a submission. You could trigger the submit button on load.
  • You could use liveValidate to continuously validate
  • You could set noValidate to true, and then directly use ajv (the validation library used in this project) to create custom validation

loganvolkers avatar Aug 28 '18 18:08 loganvolkers