Closed masoudDaliriyan closed 4 months ago
import isPort from 'validator/lib/isEmail'; import isAlphanumeric from 'validator/lib/isAlphanumeric'; import validateAll from 'validator/utils/validateAll' validateAll('8080' ,isPort ,isAlphanumeric) // true validateAll('a-80-2' ,isPort ,isAlphanumeric) // false
https://github.com/validatorjs/validator.js/pull/1619#issue-581401064
I would like to work on this if taken further.
PR raised at #1619 :)
I dont think we need to support anything such. The library is modular and you can easily make a pipe operator if such thing is needed
ValidateAll() function could take multiple validator and exec with one value
example:
https://github.com/validatorjs/validator.js/pull/1619#issue-581401064