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

.every.schema() throws "TypeError: split(...).every is not a function" #127

Closed
panstav opened this issue Oct 2, 2018 · 0 comments
Closed

Comments

@panstav
Copy link
Contributor

panstav commented Oct 2, 2018

Check this snippet.

Having this data: const data = [{ str: 'abc' }];

The first (sanity) check validates:

v8n().schema({
    str: v8n().string()
}).check(data[0]);

But if the array itself is checked - it throws:

v8n().every.schema({
    str: v8n().string()
}).check(data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants