You need to use the function unhighlight
, instead of success
.
unhighlight: function (element) {
$(element)
.closest('.form-group')
.removeClass('has-error')
.addClass('has-success');
}
Check out this fiddle: http://jsfiddle.net/mL5Vq/
Also, remember to close your input
tags