vee-validate: Latest version does not hold multiple errors per field

Versions:

  • VueJs: 2.3.0
  • Vee-Validate: 2.0.0-beta.25

Description:

I noticed that the ErrorBag in the latest version does not hold all errors for a field. In otherwords, if I set rules as such: v-validate="'email|min:6'", only 1 error will display at a time.

I browsed around and found another fiddle that displayed multiple errors per field. Saw that it was using an older version. I’ve provided fiddles for both version below.

I’m assuming this is not expected since http://vee-validate.logaretm.com/examples.html#selectors-example is clearly showing multiples per field? Or maybe I’m not defining something correctly?

Steps To Reproduce:

https://jsfiddle.net/devpake/yrbw8dL5/6/

  • This uses vee-validate 2.0.0-beta.25

https://jsfiddle.net/devpake/dqoL3b5r/4/

  • This uses vee-validate 2.0.0-beta.18

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Understandable. Agreed that having multiple validations available would seem to be a friendly option to have. For example, password validation - it would be annoying for users to be prompted with yet another validation error after correcting one. Probably less aggravating to see all the problems up front than one at a time. But one at a time can work for most. Simplicity usually wins for both use and maintenance.

@logaretm thanks! Ill try it out right once you release a new version.

Can you add something so that it can be disabled on a per element fashion? It would locally switch off the currently global behaviour in one way or the other.

@Mouvedia Sorry to keep you hanging for all this time, you can enable the behavior by setting the fastExit option to false when installing the plugin:

Vue.use(VeeValidate, { fastExit: false });

It will be true by default.