parsley validation
$('#corrective-form .btn').on('click', function() {
$('#corrective-form').parsley().validate();
validateFront();
});
var validateFront = function() {
if (true === $('#corrective-form').parsley().isValid()) {
$('.bs-callout-info').removeClass('hidden');
$('.bs-callout-warning').addClass('hidden');
} else {
$('.bs-callout-info').addClass('hidden');
$('.bs-callout-warning').removeClass('hidden');
}
};
$('#corrective-form').parsley().validate();
validateFront();
});
var validateFront = function() {
if (true === $('#corrective-form').parsley().isValid()) {
$('.bs-callout-info').removeClass('hidden');
$('.bs-callout-warning').addClass('hidden');
} else {
$('.bs-callout-info').addClass('hidden');
$('.bs-callout-warning').removeClass('hidden');
}
};
0 comments: