Skip to content

How to skip automatic validation after noValidate was deprecated? #4379

@ioanac95

Description

@ioanac95

Prerequisites

What theme are you using?

core

What is your question?

The noValidate prop on the Form component appears to have been deprecated in a recent release, prompting the omission of the validator to achieve the same goal in the future. However, for now the validator prop is required.

What is the recommended approach for skipping validation, for now?

Some background: I'm using rjsf to render a form whose definition is sent from a backend, and I'm using a mobx store to handle both change events, saving intermediate state (which involves a server request and validation of fields without taking into account required fields in the schema) and submission. Initially, I was relying on the inbuilt validation mechanisms for submission, and setting the extraErrors prop for the server errors or the custom validation happening on save. However, resetting the errors set from submit only happened on resubmission, and because of the use of Mobx with the form the liveValidate was causing problems (validating the whole form on page load when setting an empty formData prop). It seems like there's no recommended approach for resetting these errors without validating the whole form again, is that correct? To avoid these clashes and have more control over setting errors, I'm now using the extraErrors prop for submission as well and so want to skip the default validation mechanisms.

Appreciate the support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions