$(".ui.modal .ui.button.green").on('click', function(){
$("#feedbackForm").form('validate form');
$("#feedbackForm").onSucess(alert("Sucess"));
});
Every time I call this function onSucess or onFailure (whichever comes first) even if the form is showing error I get alert("Sucess"), what is exact procedure to get callback after form is validated successfully or has errors.