• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form Validation

#1
I have a form on an index page (controllername/)

That form does a POST to controllername/create

The form validation is in the index method of the controllername class.

When the form is submitted, the validation doesn't happen.

What am I doing wrong?
Reply

#2
CI performs form validation when the form input has been posted.
So move your form validation to the create method.

A better way is to keep the code for displaying the form and performing the form validation within one method.
As described in the documentation:
https://www.codeigniter.com/userguide3/l...controller
Reply

#3
Thank you.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.