-
Notifications
You must be signed in to change notification settings - Fork 556
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
Default JSON Schema type validation does not take to account whether a field is required #3901
Labels
Comments
A work around would be to extend formlyJsonschema.toFieldConfig |
Chalolennox
changed the title
JSON Schema example with dependecies does not reset validation
Default JSON Schema type validation does not take to account whether a field is required
Apr 24, 2024
aitboudad
added a commit
that referenced
this issue
Jun 9, 2024
aitboudad
added a commit
that referenced
this issue
Jun 9, 2024
aitboudad
added a commit
that referenced
this issue
Jun 9, 2024
This issue has been fixed and released as part of v6.3.4 release. Please let us know, in case you are still encountering a similar issue/problem. |
Thx, keep up the good work! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I am playing around with the json schema examples(https://formly.dev/docs/examples/advanced/json-schema) and realised the schema depedency example with bootstrap does not set validation on the field credit_card correctly when I clear the input after typing in a value. This field is optional. I suspect the validator for number type is active.
Minimal Reproduction
I have tried the react version of the library on https://rjsf-team.github.io/react-jsonschema-form/ and it works as intended in that when I clear the credit_card field, the form is valid again. As soon as I type a value and clears it, formly shows a validation error. Here is the active validator:
is there a better way to deal with nullable values which are not required when validating?
The text was updated successfully, but these errors were encountered: