-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
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
Error messages are not being propagated correctly for json object schemas.
For instance I have these two schemas, when I raise a custom error with schema2
it works nice as expected & described on the documentation. But when I do the same, but for schema
which has a type object
it doesn't work.
export const schema: RJSFSchema = {
properties: {
Test: {
type: "number",
title: "Test 1",
},
Test2: {
type: "number",
title: "Test 2",
},
},
type: "object",
};
export const schema2: RJSFSchema = {
type: "string",
default: "hello",
};
I have created the following playground that allows you to play & to check the current behavior ⬇️
Expected Behavior
Custom errors should show regardless of the schema used, which means it should show on both described scenarios.
Steps To Reproduce
- Open playground.
- You will see that I am rendering two schemas.
- Type something on each field
- You will see that for the schema of type
object
, no error is shown.
Environment
- OS:
- Node:
- npm:
Anything else?
No response