-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
All causes = null when validating v8n().schema using testAll #176
Comments
Hey @maxgalbu Actually, there's nothing wrong with your code. The But in your case, maybe you can use the |
Hi @imbrn, The rule could tell me |
While I see what you're saying, @maxgalbu, v8n doesn't actually check that |
What would happen if |
Well one of the nested causes you get with that would be this: ...
[
{
"rule": {
"name": "string",
"args": [],
"modifiers": []
},
"value": 1,
"cause": null,
"target": "token"
}
]
... To explain the above: The So you do get the information that it validated a string with a value of I'm not sure what you're asking for then. You have lots of non-null causes, but the inner most nested causes will always be null, because the root cause obviously doesn't have another cause. |
When
json
is{ "placement_code": "hello", "device_code": true, "params": 1 }
, this code outputs:What's wrong with that code?
The text was updated successfully, but these errors were encountered: