Vee-validate: Error in mounted hook: "TypeError: this.$scopes[scope][fieldName] is undefined"

Created on 18 May 2017  路  7Comments  路  Source: logaretm/vee-validate

Versions:

  • VueJs: v2.3.2
  • Vee-Validate: v2.0.0-rc.2

Description:

My form is defined as follows (code snippet):

<Input name = "user.id">

It will report an error note:

[Vue warn]: Error in mounted hook: "TypeError: this. $ Scopes [scope] [fieldName] is undefined"

but it still can work normally.

duplicate 馃悰 bug

All 7 comments

Can you please reproduce it in a fiddle, so I can see what we are dealing with? the information you provided is not sufficient to debug this.

I am also seeing this issue as soon as I add the name attribute or data-vv-name.

Error in mounted hook: (I don't even have a mounted hook in this component.)
Cannot read property 'events' of undefined

  • vue - 2.3.2
  • vee-validate - 2.0.0-rc.3

<textarea v-validate="'required'" data-vv-name="nutriqForm.data.concernOne" data-vv-as="Health Concern 1" class="form-control" placeholder="Health Concern 1" rows="2" v-model="nutriqForm.data.concernOne"/>

The validator mixin applies a mounted hook, I will investigate the issue and report back.

@shawjak3 Can't seem to reproduce the issue with the code you provided, if you can reproduce it in a fiddle it will be easier to test and fix.

@logaretm Here is the fiddle: https://jsfiddle.net/shawjak3/Lmchtxd7/4/

The mounted hook error is there and if you click in each field and leave it you will see that only the first one applies the data-vv-as name correctly.

This issue has been already resolved here #462 , but not released yet. The issue happens because of the field names include dots in them.

I will try to release the next version in a couple of days.

Here is a version of the last built files:

https://jsfiddle.net/Lmchtxd7/5/

Awesome thank you! I love the library so far

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saintplay picture saintplay  路  3Comments

schel4ok picture schel4ok  路  3Comments

parweb picture parweb  路  3Comments

MeltedFreddo picture MeltedFreddo  路  3Comments

Shchepotin picture Shchepotin  路  3Comments