node-input-validator
node-input-validator copied to clipboard
"required" don't works with empty arrays
The required condition thinks empty arrays don't exist and sends a "the * field is mandatory" error. Is there any way to require an array that can be empty?
Reproducing the error:
async function a() { const v = new Validator( { test: [] }, { test: 'required' } ); const matched = await v.check(); console.log(matched); }