-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
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?
shadcn
Version
6.0.0-beta.10
Current Behavior
I'm trying to use extraErrors
to show a error on a property of type object
that has multiple properties. In the default theme works fine, highlighting all fields of the object as error, but with shadcn theme it displays the error and no highlighting of fields.
Expected Behavior
All fields that are properties of the object should be highlighted like in the default theme
Steps To Reproduce
BTW: I tried sharing the link of the playground but it doesn't load correctly (missing extraErrors
textarea)
- Go to the playground
- Select
ErrorSchema
option - Use this
schema
:
{
"title": "A registration form",
"description": "A simple form example.",
"type": "object",
"required": [
"firstName",
"lastName"
],
"properties": {
"firstName": {
"type": "string",
"title": "First name",
"default": "Chuck"
},
"lastName": {
"type": "string",
"title": "Last name"
},
"age": {
"type": "integer",
"title": "Age"
},
"password": {
"type": "string",
"title": "Password",
"minLength": 3
},
"contact": {
"type": "object",
"properties": {
"bio": {
"type": "string",
"title": "Bio"
},
"telephone": {
"type": "string",
"title": "Telephone",
"minLength": 10
}
}
}
}
}
- Use this
extraErrors
:
{
"contact": {
"__errors": [
"some error that got added as a prop"
]
}
}
- See fields correctly highlighted
- Select
shadcn
theme - Fields are not highlighted anymore
Environment
- OS: Windows 10
- Node: 22.13.11
- pnpm: 10.7.0
Anything else?
With default theme:
With shadcn theme: