This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Description
There is a minor (but frustrating) glitch when editing a previously touched field.
When the typing starts, the $invalid property of the field is set to true, so the watch inside the bootstrapValidationDecorator fires and the toggleClass method sets the "has-error" class to the decorator. One second after the typing stopped, the $invalid is set to false so the watch fires again and removes the "has-error" class.
The result is that while typing, the element is decorated in red (as I said, it only happens if the field has been previously touched).
I'm trying to figure out how to fix this, but can't find the solution. Any ideas?
(In summary, I think the solution is as simple as detecting when the field is inside the delay of 1 second to avoid showing the error during that time)