You have to declare your parsley form in JS and override the default onFormSubmit
Listener. Also hide your alert div with a css class and then remove the class when you want to display it.
$(function () {
$('#someForm').parsley({
listeners : {
onFormSubmit : function (isFormValid, event) {
if(!isFormValid) {
//display your error div
}
}
}
});
});
If you want to add more specific messages to your alert take a look at the onFieldValidate
and onFieldError
listeners http://parsleyjs.org/documentation.html#javascript