Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when the rules are an empty string #676

Closed
lerit opened this issue Jul 29, 2017 · 2 comments
Closed

TypeError when the rules are an empty string #676

lerit opened this issue Jul 29, 2017 · 2 comments
Labels
🐛 bug Unintended behavior

Comments

@lerit
Copy link
Contributor

lerit commented Jul 29, 2017

Versions:

  • VueJs: 2..4.2
  • Vee-Validate:2.0.0-rc.8

Description:

<textarea name="myField" v-validate="checked ? 'required|alpha' : ''"> it work before(rc.7),after update to rc.8,it throw error: "Error in directive validate bind hook: "TypeError: Cannot convert undefined or null to object"" after debug,i find error throw in Field.prototype.updateDependencies ,when try to read this.rules ### Steps To Reproduce: https://jsfiddle.net/gcnf5ucn/8/
@lerit
Copy link
Contributor Author

lerit commented Jul 29, 2017

my reproduce is base on this link:#622,
in that issue,logaretm give a example ,and it work fine(base on rc.5)

@logaretm logaretm added the 🐛 bug Unintended behavior label Jul 29, 2017
@logaretm
Copy link
Owner

It works fine, but it seems like it breaks if you provide an empty rules string to it:

https://jsfiddle.net/logaretm/gcnf5ucn/9/

@logaretm logaretm changed the title condition validate cause error after update to rc8 TypeError when the rules are an empty string Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants