react-jsonschema-form
react-jsonschema-form copied to clipboard
Support for patternProperties
Prerequisites
- [x] I have read the documentation;
- [ ] In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
- [ ] Ideally, I'm providing a sample JSFiddle or a shared playground link demonstrating the issue.
Description
No support for defining properties with patternProperties.
Documentation available here
Steps to Reproduce
- Define object properties using
patternPropertiesin JSON schema - Data validation against the JSON schema is successful.
- 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
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.
Did you find any other solutions for patternProperties? @j-zimnowoda
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?
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. 😅
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.
This issue remains relevant for us
This issue was closed because of lack of recent activity. Reopen if you still need assistance.
Please keep this issue open, thank you.
It would be lovely if we could re-open this
Fixed with #4582