rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
14.36k stars 2.19k forks source link

Support for patternProperties #1944

Open mohammedkhadar opened 4 years ago

mohammedkhadar commented 4 years ago

Prerequisites

Description

No support for defining properties with patternProperties.

Documentation available here

Steps to Reproduce

  1. Define object properties using patternProperties in JSON schema
  2. Data validation against the JSON schema is successful.
  3. Object properties are not rendered as Form fields.

Expected behavior

Properties in the data should be rendered as form fields.

Actual behavior

Properties in the data are not rendered as form fields.

Version

2.2.1

j-zimnowoda commented 3 years ago

It would be very helpful to have that feature. I am working with many JSON schemas that use patternProperties. Unfortunately I can't use rjsf for generating forms.

JameStitel commented 2 years ago

Did you find any other solutions for patternProperties? @j-zimnowoda

marians commented 1 year ago

We have a need for patternProperties support here, too.

In terms of the user experience, I see this being quite similar to the additionalProperties solution, with the difference that the key entered by the user must be validated against the pattern. In case key and pattern do not match, an error must be displayed in the vicinity of the key field.

Agree?

Nezteb commented 1 year ago

For what it's worth, here is most of jsonform's implementation of patternProperties, which just uses JSV's implementation from over a decade ago. 😅

stale[bot] commented 1 week ago

This issue has been automatically marked as possibly close because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you.

marians commented 1 week ago

This issue remains relevant for us