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

Confirm validation does not work as expected.

Abierto
#528 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
425
Forks
136
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## 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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.