-
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
Bad validation message #3914
Comments
it is required to pass an empty string for that case, if I'm not wrong. Please try the following solution instead: "items": {
"type": "string",
"minLength": 0,
+ "default": ""
} |
Unfortunately, this does not work. Here is a modified example: https://stackblitz.com/edit/angular-kwmyzs-pmxgrs?file=src%2Fassets%2Fjson-schema%2Farrays.json |
In fact a field with an parent field of type array should never be required at least for a JSONScheam. The required property is only available on the object type thus only for the children of an object field. I tried to add a patch in the prePopulate of my extension, but changing the |
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. |
Unfortunately this is the case. You have introduce a new bug in the version 6.3.4. Using the following stackblitz example the field "new" is not marked as required anymore: Thanks in advance. |
The issue here is when/in which case an array item is considered required. here is how it is handled:
|
If I understood well, you want to make a input field required only when a field is touch, but we have several problems here. Running the following modified example:
Thanks in advance for your reply. |
Description
A wrong validation message is displayed with arrays.
Minimal Reproduction
Here you can find a stackblitz reproduction example. If you click on submit we got a required error message instead of a minLength. Let us know if we need to open an issue.
https://stackblitz.com/edit/angular-kwmyzs-pmxgrs?file=src%2Fassets%2Fjson-schema%2Farrays.json
Thanks in advance.
The text was updated successfully, but these errors were encountered: