ajaxValidation

Using callbacks to show validation results in jQuery UI dialog.

$dialog = $('#the_form .validationSummary').dialog({ modal: true, autoOpen: false, title: 'Validation errors.', show: { effect: "drop", direction: "up", duration: 500 }, buttons: { Ok: function(){ $(this).dialog("close"); } } }); $('#the_form').ajaxValidation({ mode: 'submit', onError: function(message){ $dialog.html(message); $dialog.dialog("open"); return false; } }); $('#validate').click(function(){ $('#the_form').ajaxValidation('validate'); });

The general idea about all callbacks in ajaxValidation plugin is that you may return false to prevent plugin's default behaviour (pasting of validation message in the corresponding element)

You may also return a string to make plugin paste this new string in the result element.

Contact form