V
V
VueJS Generators
GitHub
NPM
JSFiddle
CodePen
Search…
1.0.0
Getting Started
Installation
Usage
Component
Fields
Groups
Validation
Built in Validators
Custom Validators
Handling Validation Events
Powered By
GitBook
Handling Validation Events
The
vue-form-generator
component emits a validated event, if validation is executed.
The event parameters are:
isValid: boolean, errors: Array
.
Example:
You can create a method to handle this event and bind it like this:
1
<
vue-form-generator
@validated
=
"
onValidated
"
/>
Copied!
1
methods
:
{
2
onValidated
(
isValid
,
errors
)
{
3
console
.
log
(
"Validation result: "
,
isValid
,
", Errors:"
,
errors
);
4
}
5
}
Copied!
Previous
Custom Validators
Last modified
3yr ago
Copy link
Contents
Example: