ember-cp-validations
ember-cp-validations copied to clipboard
Presence, even unused, of ember-cp-validations breaks existing use of ember-validations
Environment
- Ember Version: 2.13, 2.12, 2.10
- Ember CLI Version: 2.13 (and others)
- Ember CP Validations Version: 3.3.0, and others
Steps to Reproduce
I'm trying to migrate a project from [email protected]
-> [email protected]
but they don't seem to coexists nicely in a project together. Specifically the presence of ember-cp-validations
makes objects validated with ember-validations
stop having a populated errors
object.
ember-cp-validations
doesn't even need to be import
ed or used.
In follow twiddle, only ember-validations
is added and the validation applied to the form / textfield state that the button is disabled
if the value of the text field is black. You can see that any value entered into the field will enable the button, clearly the value will disable it again.
https://ember-twiddle.com/#/76ff3bdc90f2c7082c71694ab30249ed?openFiles=twiddle.json%2Ctemplates.components.email-form.hbs
In the next twiddle, the only change is the addition of ember-cp-validations
to the twiddle.json
file causes this above behavior to fail.
https://ember-twiddle.com/794fe0b37f973073c00bec362d69f4d0?openFiles=twiddle.json%2Ctemplates.components.email-form.hbs
and I've tried several combos of each lib: older cp-validations, newer ember-validations / later cp-validations, newer ember-validations / older cp-validations, older ember-validations / latest for both, etc.
@offirgolan mentioned in #e-cp-validations
that a version difference in ember-getowner-polyfill
might be the culprit
ember-getowner-polyfill is the issue here cp-validations is on
^1.2.0
ember-validations is on^1.0.0
But ember-validations
operates quite happily in a world where ember-getowner-polyfill
is forced to be 1.2
, and locally the two versions dedup so that only 1.2.0
is installed.
https://ember-twiddle.com/7b2a829e216031451ad7d70037ded8a2?openFiles=twiddle.json%2Ctemplates.components.email-form.hbs
And fails again once ember-cp-validations
is added.
https://ember-twiddle.com/77f41bb1cd453d59697606f64df8baf8?openFiles=twiddle.json%2Ctemplates.components.email-form.hbs
Hi, I have exactly the same problem. I would like to incrementally replace ember-validations with ember-cp-validations, but when I install ember-cp-validations, then ember-validations does not work properly. Any advice how I could fix it?
@trek @candunaj is this still a problem or can we close the issue?