aurelia / aurelia/validation

Binding behaviors "validate" and "updateTrigger:'blur'" don't mix

Open
#423 12 comments 3 reactions 1 assignee Claimed by @jdanyow View on GitHub
question
Dominant language
TypeScript
Stars
129
Forks
125
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a bug report**

* **Library Version:**
1.0.0

* **Browser:**
Chrome 55

**Current behavior:**
When applying both the `updateTrigger:'blur'` and `validate` binding behaviors to a binding, the value is validated before it is updated.

See https://gist.run/?id=c533e53e62cb348cc96aa9445bae612a and note when entering characters and blurring the input the validated value is always the previously entered value.

**Expected/desired behavior:**
The validation should only run after the source value has been updated. This should also work when using `validateOnBlur` rather than `validate` in the same scenario. I'm not sure how something like `value.bind="myVal & updateTrigger:'blur' & validateOnChange"` should be handled - perhaps a warning against this in the documentation would suffice.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.