I have a dialog form popup when I click one button, this form is used to create a new school record with just one field. I have add required validation to this only input field, and everything works fine, but the only thing I don't know how to do is when I click submit, whatever form validate or not, the dialog will dismiss by following code:
initDataTable();
// Dismiss the dialog
$('#dialogNewSchool').dialog('close');
before the dialog close, I should put the form validation check (something like the return from validation class), how I can do this in javascript? I'm using JSF 2.1 implementation.
Btw, I don't want to use client side validation, because not only required validation needed for this field.
Thanks. ;)