0
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 use it:
< ? php echo form_open('empresa/inserir', 'id="form-empresa"'); ?>
< inputs ...
< button submit / >
< / form >
However, whenever I give the Submit, it sends it directly to the codeigniter controller, ignoring the page validation.
What should I do to make it validate the client side page first with jQuery, and if it’s all right, call the codeigniter function?
What Data Types Need to Validate?
– tkmtts
Wouldn’t it be easier to use the codeigniter form_validation library? It works very well. If you don’t know how to use it, give me a call.
– Rafael Rotiroti
So I need to validate some input type text fields, type name, email ... but if I use the form_validation of codeigniter I will be validating by server side, and I wanted to validate by client side, will not have any method?
– Bruno