-
Notifications
You must be signed in to change notification settings - Fork 40
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
Cannot set the error for a type of array #38
Comments
I've encountered the same error. From what I've managed to see it is the bug in the I have data structure like follows:
The bug happens in following code:
The
which is not correct. |
@br0wn Hello, have you found any solution for that? I found a temporary solution for this. I can read the schema and build a field level validation manually. But I don't think this is a good solution for now. |
@leuction Unfortunately no :( I disabled the default sync validation provided by the library as I don't need it at the moment. If you have time and will, you can fix |
Problem:
I tried with a schema like this
This is an array schema, I cannot get the error when I want to valid the properties inside the object of the array such as
foo
orbar
.I don't know whether that is a bug. I try to validate that with ajv, and the ajv reported 2 errors with dataPath:
[0].foo
and[0].bar
, the first character of the dataPath is not.
, so that I think that might the reason why the buildSyncValidate will not transform the dataPath into the format like/0/foo
, so that I cannot validate the field in a object in the array.I think the if statement of detect whether the first character of dataPath is
.
or not is redundant. This will be repaired by remove that if statement.The text was updated successfully, but these errors were encountered: