UNPKG

vuelidate

Version:

Simple, lightweight model-based validation for Vue.js

10 lines (9 loc) 264 B
import { withParams } from './common' export default (...validators) => { return withParams({ type: 'and' }, function(...args) { return ( validators.length > 0 && validators.reduce((valid, fn) => valid && fn.apply(this, args), true) ) }) }