Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

when I set type:["string",null],this custom errorMessage is invalid #1137

Closed
MrGengLei opened this issue Dec 6, 2024 · 1 comment · Fixed by #1138
Closed

when I set type:["string",null],this custom errorMessage is invalid #1137

MrGengLei opened this issue Dec 6, 2024 · 1 comment · Fixed by #1138

Comments

@MrGengLei
Copy link

oneOf:errorMessage is valid,but type:["string",null] errorMessage is invalid
{
"type": "object",
"properties": {
"keyword": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"errorMessage": {
"oneOf": "keyword必须为字符串"
},
"title": "关键字"
},
"keyword1": {
"type": ["string","null"],
"errorMessage": {
"type": "关键字1必须为字符串"
},
"title": "关键字"
}

}}

@stevehu
Copy link
Contributor

stevehu commented Dec 6, 2024

I don't think all keywords have customized errorMessage support. For some keywords, the error message is standard and it does support translation into Chinese. Thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants