How the gem works?
For the form you want to validate, you maintain the validations in the respective Model. The validation set in the model works for server-side validation. For client-side validation this gem actually creates the required js codes the validation you set in the model.
Solution No: 1
# Just after the form is loaded in the DOM if your gem is client_side_validations $(new_form).enableClientSideValidations(); # Specifically for rails4_client_side_validations gem $(new_form).enableRails4ClientSideValidations();
Solution No: 2
So, in case of popups the required js codes have not been loaded in the document yet, so you need to render the js too with the view for the popup
In my case I created a layout specific for this popup or all this type of popups. and just rendered the validator’s js