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

"validatePresence on" not updating

Abierto
#193 7 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
215
Forks
98
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

`validatePresence({ presence: true, on: 'email' })`

## Version
2.1.0

This is probably me misunderstanding the behavior of the validator.

## Steps to reproduce

```
export default {
email: [
validatePresence(true),
validateFormat({ type: 'email' }),
],
password: [
validatePresence({ presence: true, on: 'email' }),
],
}
```

## Expected Behavior
Empty password validates fine, but

1. turns invalid once an email is entered, or
2. turns invalid after focused after email is entered.

## Actual Behavior

Empty password stays valid, focused or not.
Once you type in a password _and then remove it again_ then the validator fails (as expected).

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.