theSteveMitchell/client_side_validations — comment on commit 47a34ee8229fea0c7e8f470bc8e053ca82fcc673
File:  line 0
By theSteveMitchell:

In our web application, we use devise for authentication, and we have a shared login/registration page, as well as a modal popup for login from the navigation menu. Client_side_validations was getting confused because all three forms use the same model and field names. When adding/removing the validation messages, the js doesn't know which form we're validating, and so the messages were being added to the first form on the page (which was often not visible).

This update restricts the add and remove methods to select only in the current form when replacing labels. Also made some tweaks to prevent the error messages from showing in a separate div, so we can be more flexible on where the validation messages appear.