imbrn/v8n

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

panstav opened this issue · 0 comments

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);