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

Bad validation message #3914

Closed
jma opened this issue May 16, 2024 · 1 comment
Closed

Bad validation message #3914

jma opened this issue May 16, 2024 · 1 comment
Labels

Comments

@jma
Copy link

jma commented May 16, 2024

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.

@jma jma added the bug label May 16, 2024
@aitboudad aitboudad added question and removed bug labels May 26, 2024
@aitboudad
Copy link
Member

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": ""
}

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

No branches or pull requests

2 participants