Hi,
I'm trying to validate my form before submiting it. I'm trying it with this code below, but it always submit the form values:
Any help?Code:$('#gestione_profilo').submit(function () { $("#gestione_profilo").validate({ rules: { 'person_data[document_number]': "required" }, messages: { 'person_data[document_number]': "required" } }); form_data = $(this).serialize(); $.ajax({ url: "<?php echo url_for('profile/index') ?>", type: "POST", data: form_data, success: function() { $("#forma_profile").unmask(); } }); $("#forma_profile").mask("Aggiornando dati..."); return false; });
Regards
Javier


Reply With Quote
Bookmarks