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

"validatePresence on" not updating

オープン
#193 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
215
フォーク
98
PR マージ指標
30日以内にマージされた PR はありません

説明

`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).

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。