v-form component makes it easy to add validation to form inputs. All input components have a
rules prop which takes an array of functions. Whenever the value of an input is changed, each function in the array will receive the new value. If a function returns false or a string, validation has failed.
If enabled, value will always be true unless there are visible validation errors. You can still call
validate() to manually trigger validation
A boolean value representing the validity of the form.
Validation with submit & clear
v-form component has two functions that can be accessed by setting a ref on the component.
validate() will validate all inputs and return if they are all valid or not.
reset() will clear validation errors from all inputs.
Vee-validate is another validation plugin that allows you to check your forms. One caveat is that you must add the type="checkbox" to properly validate a
v-checkbox when using the value prop.