Boostrap Validator - Reset validated field

If you work with Boostrap Validator (http://1000hz.github.io/bootstrap-validator/), sometime, you may 
want to reset validated field.

If you have added





You will need to remove has-error, has-danger and has-success.

For example

$('#from_group').removeClass('has-error has-danger has-success');

If you have added







You will need to remove glyphicon-remove and glyphicon-ok class

For example,

$('#glyphicon_span').removeClass('glyphicon-remove glyphicon-ok');

If you have added










You will need to empty the inner html

For example,

$('#error_div').html("");

Comments

Popular Posts