Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

ng-model: add validateOn to allow validation on different events then updating #15128

Closed
jbedard opened this issue Sep 12, 2016 · 1 comment
Closed

Comments

@jbedard
Copy link
Contributor

jbedard commented Sep 12, 2016

Do you want to request a feature or report a bug?
feature

What is the current behavior?
ng-model always updates and validates at the same time based on the updateOn

What is the motivation / use case for changing the behavior?
I normally don't want my model to be updated as the user types. It might show up other places half complete, it might not be valid yet etc. But I normally do want instant validation as the user types.

I find myself always trying to achieve this various ways such as setting ng-model to a copy of the real model or setting it to Object.create(realModel) then copying the value to the real model on blur.

WDYT? Or is there an easier way to do this that I'm missing?

@Narretz
Copy link
Contributor

Narretz commented Sep 13, 2016

Duplicate of #7016

It didn't get much traction, so I'm still not convinced we need it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants