Codeigniter validating dates

Posted by / 15-Sep-2017 21:08

You make it easy for them to compare what they entered to the error message.

If you develop using a PHP framework such as Cake PHP, there is a built in validation system that makes validating form data trivial.

To accomplish this, I use an array called $form_errors.

I key the array using the name of the form field that caused the error.

It also prevents a user from having to re-enter every field to correct their error and complete your form.

To accomplish this in my own code, I copy the values from the $_POST array to another array.

codeigniter validating dates-76codeigniter validating dates-3codeigniter validating dates-4

I also order my validation rules in order of priority.