Vee-validate: TypeError: handleSubmit is not a function

Created on 27 Feb 2020  路  3Comments  路  Source: logaretm/vee-validate

Versions

  • vee-validate: ^3.0.8
  • vue: latest

Describe the bug
I get error handleSubmit is not a function

To reproduce
Steps to reproduce the behavior:

Assign handleSubmit on a form submit event.

<ValidationObserver v-slot="{ invalid, handleSubmit }">
    <form @submit.prevent="handleSubmit(goToPayment)">

Error: TypeError: handleSubmit is not a function

Most helpful comment

It was introduced in 3.2 make sure to use that version.

All 3 comments

Just faced the same issue, but it turns out I was using older version of vee-validate, 2.* or something. I runed npm list in console to see the exact version used.

I reinstalled latest version and in 3.2.5 it works just fine

Also printing out the slot props object in console helped to see, that there is no handleSubmit in that object indeed.

P.S.: In Migration guide there is a note, that some method was renamed to handleSubmit, not sure if it relates to the problem
https://logaretm.github.io/vee-validate/migration.html#renamed-validationobserver-passes-slot-prop-method

It was introduced in 3.2 make sure to use that version.

I am having the same issue with [email protected], any ideas?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DM2489 picture DM2489  路  18Comments

renedekat picture renedekat  路  19Comments

denjaland picture denjaland  路  31Comments

badcom picture badcom  路  27Comments

CephNightmare picture CephNightmare  路  18Comments