Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to define type objects whichs default may be null #170

Open
Redge1973 opened this issue May 6, 2024 · 0 comments
Open

Unable to define type objects whichs default may be null #170

Redge1973 opened this issue May 6, 2024 · 0 comments

Comments

@Redge1973
Copy link

I can't manage to specify the properties for an object that can be null. I am building the config and the json schema from a json and I really don't know what to specify as type. If I enter the type mixed, then the correct error message is displayed for the value null, but a date schema is generated for it, which of course is not accepted if the value is an object with e.g. {index: 1, value: 2}.
validation: {
errorMessages: {
required: 'Please enter an interval',
},
required: true,
properties: {
type: 'mixed',
},
},
defaultValue: null,
I just can't find any help in the documentation on how to do this. If I take object as type, I always get the message null is not allowed. isNullable: true doesn't help either

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

No branches or pull requests

1 participant