ReactiveRaven / jqBootstrapValidation

A JQuery validation framework for bootstrap forms.
http://reactiveraven.github.io/jqBootstrapValidation
MIT License
1.35k stars 336 forks source link

filter does not affect "required" item #198

Open lgm42 opened 7 years ago

lgm42 commented 7 years ago

I'm using filter function

filter: function() {
                    //we check only control that have class enable-validation and are visible
                    return $(this).is(".enable-validation") && $(this).is(":visible");
                }

Some text inputs are with "required" flag

<input type="text" class="form-control enable-validation" required value="192.168.109.26" >

When I remove "enable-validation" class from this input it still checked by jqBootstrapValidation engine even the filter should not return it.

If I remove required and use other validations items like regex it works well.