Vuelidate: How about adding 'exactLength', 'inList' and 'regex' builtin validator?

Created on 11 Feb 2019  路  3Comments  路  Source: vuelidate/vuelidate

I love vuelidate a lot, provides great versatility with customizing validators. However some common rules are frequently used and could be really handy if become a builtin validator.

If a value should be exactly n characters long, a 'exactLength' would be perfect.
If a value should be one element of a certain set, a 'inList' would be nice.
If shoud meet certain pattern, a 'regex' should be useful.

feature request

Most helpful comment

I think we can make an extra package with various validators, so the base package is as clean as possible. This way it would be easier to contribute.

All 3 comments

I think we can make an extra package with various validators, so the base package is as clean as possible. This way it would be easier to contribute.

@kamaslau, regex is essentially already there: https://vuelidate.netlify.com/#sub-list-of-helpers

@jpickwell , roger that, although providing ready-to-use validators might be easier to apply.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daverogers picture daverogers  路  3Comments

jess8bit picture jess8bit  路  3Comments

grucha picture grucha  路  4Comments

jfis picture jfis  路  3Comments

jonjrodriguez picture jonjrodriguez  路  4Comments