I want to do a validation with jQuery before sending the data to the server side, I'm using PHP with jQuery and in the form part I use this:
< ? php echo form_open('empresa/inserir', 'id="form-empresa"'); ?>
< inputs ...
< button submit / >
< / form >
However, whenever I submit the submit, it sends it directly to the codeigniter controller, ignoring page validation.
What should I do to validate the client-side page first with jQuery, and if it's all right, call the codeigniter function?