nghuuphuoc/bootstrapvalidator — pull request #292 by alavers (2014-05-25 16:49:40+00:00)
Title: Fix identical validator issue with not clearing has-error class

I was having an issue with the identical field validator, for example the password+confirmPassword in the demos. The validator is correctly detecting identical state, and both fields get marked with the check icon, but the container of the password field was not getting it's `has-error` class removed.

So what you saw was two password fields each with check marks and submit buttons enabled, but one of the two password fields remained highlighted in red.

I looked into it, and it seems the code to detect when to clear the has-error class on a container was binding to the display==block style of each of the fields inside, in addition to the VALID state indicated in the data attributes. So if you've got two fields each with their own error message, this would spoil the check because it has to be performed in multiple calls to updateElementStatus.

I'm not sure why the display==block check was there, I figured it might be residual, removing it fixes the issue.