-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
any-one-all-ofRelated to fixing anyOf, oneOf or allOfRelated to fixing anyOf, oneOf or allOfquestionvalidation
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
5.x
Current Behavior
Using sample JSON for oneOf given on RJSF playground,
{
"type": "object",
"oneOf": [
{
"properties": {
"lorem": {
"type": "string",
"maxLength": 50
}
},
"required": [
"lorem"
]
},
{
"properties": {
"ipsum": {
"type": "string",
"maxLength": 50
}
},
"required": [
"ipsum"
]
}
]
}
I have just inserted maxLength attribute to both of the properties to validate the max length.
Expected Behavior
It should throw only : "must NOT have more than 50 characters".
Should not throw : "must match exactly one schema in oneOf".
Steps To Reproduce
try above mentioned JSON schema on rjsf playground and validate the form
Environment
- OS:
- Node:
- npm:
Anything else?
thijssmudde
Metadata
Metadata
Assignees
Labels
any-one-all-ofRelated to fixing anyOf, oneOf or allOfRelated to fixing anyOf, oneOf or allOfquestionvalidation