ember-changeset-cp-validations icon indicating copy to clipboard operation
ember-changeset-cp-validations copied to clipboard

Validation doesn't work on a validator with dependentKeys

Open aonawale opened this issue 8 years ago • 0 comments

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?

aonawale avatar Aug 19 '17 10:08 aonawale