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

Validation of a property with patternProperties is wrongly failing

Open lucas-jc opened this issue 8 months ago • 4 comments

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

The validation of the property with pattern is failing, even when it is empty.

Expected Behavior

The validation should pass in this scenario.

Steps To Reproduce

  1. Open this shared link of RJSF Playground example.
  2. Click in the form submit button, the validation is ok.
  3. Fill annotation1 field with any text and then clean it.
  4. Click again in the submit button and now the validation fails, even with the annotation object empty, the same state it was in step 2.

Environment

React Json Schema Playground environment - https://rjsf-team.github.io/react-jsonschema-form

Anything else?

Image

lucas-jc avatar Mar 06 '25 13:03 lucas-jc