jpkleemans / angular-validate

Painless form validation for AngularJS. Powered by the jQuery Validation Plugin.
MIT License
68 stars 32 forks source link

setDefaultMessages(): Cannot read property 'constructor' of undefined #10

Closed jaybayley closed 8 years ago

jaybayley commented 8 years ago

Hi JP,

Thank you so much for reacting to issue #9 so quickly, I really appreciate it.

Updating to 1.1.0 is now giving me the above error when trying to use setDefaultMessages. Stack trace below:

TypeError: Cannot read property 'constructor' of undefined
    at Function.$.validator.format (http://localhost:3000/bower_components/jquery-validation/dist/jquery.validate.js:226:13)
    at Object.format (http://localhost:3000/bower_components/jpkleemans-angular-validate/dist/angular-validate.min.js:1:662)
    at http://localhost:3000/app/index.module.js:59:37
    at Object.invoke (http://localhost:3000/bower_components/angular/angular.js:4709:19)
    at runInvokeQueue (http://localhost:3000/bower_components/angular/angular.js:4602:35)
    at http://localhost:3000/bower_components/angular/angular.js:4611:11
    at forEach (http://localhost:3000/bower_components/angular/angular.js:321:20)
    at loadModules (http://localhost:3000/bower_components/angular/angular.js:4592:5)
    at createInjector (http://localhost:3000/bower_components/angular/angular.js:4514:19)
    at doBootstrap (http://localhost:3000/bower_components/angular/angular.js:1751:20)

Am I doing something wrong? My jquery-validation version is 1.14.0.

Cheers,

Jay

jpkleemans commented 8 years ago

Hi,

Thanks again.

I've fixed it in 1.1.1, updating should remove the error.

JP