VeeValidate is a plugin for Vue.js offering a suite of form validation tools.
A common validation for password fields is to ensure two fields, one for the password and another for the confirmation input, actually match. If you looked over the list of stock validators and didn’t see it, the
confirmed validator (although, perhaps oddly named) is what we want.
Check out the CodePen below for a working demo of the password confirmation validator.
The official vee-validate docs are sparse on how this validator actually works. One tip to keep in mind: make use of the
data-vv-as="password" attribute for the confirmation field. The value input for this attribute is used as the field label in the error message.