import {validate, length, forEach, email} from './src/index'; let data = { users: ['nauman', ''], people: [{ name: 'nauman' }] } validate(data, { users: [ forEach([email()]) ], // people: [length(2, 50), forEach({ // name: [length(10, 100)] // })] }).then(()=> { console.log('passed') }).catch((err)=> { console.log(JSON.stringify(err)); })