victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
972 stars 476 forks source link

errorMessageClass does not support multiple classes #626

Open joeshee opened 7 years ago

joeshee commented 7 years ago

I tried to add multiple classes in errorMessageClass property. Turns out, it work fine for single class but when I validate the form with multiple classes, it does not remove previous messages.

This is how my errorMessageClass looks like my configuration: errorMessageClass : 'form-error col-md-9 col-md-offset-3',

It looks like the issue is because of this line:

$parentContainer
          .find('.' + conf.errorMessageClass)
          .remove();

Currently I am using this with following fix:

$parentContainer
          .find('.' + conf.errorMessageClass.replace(/ /g, '.'))
          .remove();

Or is there any alternative to resolve this problem without the changes mentioned above

victorjonsson commented 7 years ago

Not at the moment.