Describe the solution you'd like
async handleSubmit(cb: Function) {
const isValid = await this.validate();
if (!isValid || !cb) {
return;
}
return cb();
},
https://github.com/logaretm/vee-validate/blob/master/src/components/Observer.ts#L188
Can you support passing parameters for the callback?
For example:
handleSubmit(submit, param1, param2);
You can easily pass whatever you want:
handleSubmit(() => submit(param1, param2))
Nice workaround. However, this should be implemented maybe in a cleaner way, lets say so you can do:
@submit.prevent="handleSubmit(verifyAttribute('email'))"
Where email could be anything according to the needs.
This suggested approach throwns an error.
Most helpful comment
You can easily pass whatever you want: