lundi 20 juin 2016

Setup for ember-cp-validations

I'm trying to integrate ember-cp-validations to my project, so far now the code runs k but when i try to run "validate" methods i receive this error

Uncaught TypeError: Validator.getDependentsFor is not a function

I tracked down the error to this line

http://ift.tt/28K9KfY

const dependents = Validator.getDependentsFor(attribute, options) || [];

which tries to call a function getDependentsFor on a Validator object returned here

http://ift.tt/28LL0Qd

const Validator = type === 'function' ? BaseValidator : lookupValidator(owner, type);

as type equals to "presence" it looks for the validator using lookupValidator and it's found but the class returned does not have the function getDependentsFor, i'm not sure if this is a bug or i'm missing something :/

Versions Ember : 2.5.1 Ember Data : 2.6.1 ember-cp-validations : 2.9.3

Any help will be appreciated!

Thanks in advance!!!




Aucun commentaire:

Enregistrer un commentaire