How to handle jquery validate error messages?

Asked

Viewed 466 times

3

Here is the case: I have two inputs, the two are validated with the validate, one I need to show the error msg and change the border color, the other just need to change the color of the Boar, without error msg. Is it possible to do this? Because even not mentioning the input in the messages the label appears (blank but appears), and ends up with my entire layout. I would like someone’s help if possible. Thank you.inserir a descrição da imagem aqui

  • You’re using form_for or simple_form. Add the code view to your post

1 answer

0


You can try to hide the error message:

$('#ID_DO_INPUT').siblings('label.error').css('display', 'none');
  • That I had already tried and it did not work. continues the same case.

  • You have to call after each validation method.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.