adopted-ember-addons / adopted-ember-addons/ember-changeset

Confirm validation does not work as expected.

Aperta
#528 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
425
Fork
136
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 3.8.0

## Test Case
I have

## Steps to reproduce
I have a validations file which validates user fields. One of these fields requires confirmation on entering.
`ssn: [
validatePresence({ presence: true, message: 'Please enter SSN' }),
validateFormat({ regex: /^(?!000|666)[0-8][0-9]{2}-(?!00)[0-9]{2}-(?!0000)[0-9]{4}$/, allowBlank: false, message: 'Please enter a valid SSN' })
],
confirmSsn: validateConfirmation({ on: 'ssn' })`

As seen above, confirmSsn will check with the ssn field.

## Expected Behavior
I expect when the values are same the error message should not show up.

## Actual Behavior
When I call `this.changeSet.validate()` it gives me an erorr saying Confirm ssn does not match ssn. But when I check the actual text box values both are exactly the same.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.