-
Notifications
You must be signed in to change notification settings - Fork 4
Check validation
Oscar edited this page Sep 3, 2018
·
2 revisions
To check a validation you can call $vmv.$validate with the following parameters:
Parameter | Required | Default | Description |
---|---|---|---|
validationPath | true | Is a string representing the data path we want to validate | |
successCallback | false | Is the function that will be run if validation success | |
errorCallback | false | Is the function that will be run if validation fails | |
revalidate | false | false | Is a boolean indicating if values should be validated again even if they were already |
propagate | false | true | Is a boolean telling the validation to follow the object childs |
Example
this.$vmv.$validate('login', () => {
alert('Login successfull');
}, () => {
alert('Login unsuccessfull');
});