Validator.js: Feature request: Add generic regex validator

Created on 2 May 2018  路  1Comment  路  Source: validatorjs/validator.js

Awesome package, thanks for sharing.
Could you add a method that supports any custom regex expression? It could be useful to support niche related validations.

Thanks

Most helpful comment

Try matches(string, regexPattern):

> validator.matches('foo', /foo/i)
true

>All comments

Try matches(string, regexPattern):

> validator.matches('foo', /foo/i)
true
Was this page helpful?
0 / 5 - 0 ratings

Related issues

karladler picture karladler  路  3Comments

IOAyman picture IOAyman  路  4Comments

Maxreglez picture Maxreglez  路  3Comments

MindRapist picture MindRapist  路  4Comments

malkhuzayyim picture malkhuzayyim  路  4Comments