ember-changeset-cp-validations
ember-changeset-cp-validations copied to clipboard
Validation doesn't work on a validator with dependentKeys
I noticed that validators with dependent keys don't work as expected. The value is also invalid even when it is really valid.
export default buildValidations({
paymentMethod: validator('inclusion', { in: ['cash', 'card'] }),
creditCard: validator('presence', {
presence: true,
dependentKeys: ['model.paymentMethod'],
disabled: computed.equal('model.paymentMethod', 'cash')
})
});
Is there a fix or workaround for this?