Since v4.3.0, new Form helper functions validation_errors(), validation_list_errors() and validation_show_error() to display Validation Errors are added.
You can use the same View form file for a simple form and a form with redirect.
- PHP 7.4 or later
- CodeIgniter 4.4
$ git clone https://github.com/kenjis/ci4-validation-tutorial.git
$ cd ci4-validation-tutorial/
$ composer install
$ php spark serve
This is a simple form:
- Navigate to http://localhost:8080/form1 (
GET /form1
)- Display the form1
- Submit (
POST /form1
)
This form is using redirect and withInput():
- Navigate to http://localhost:8080/form2 (
GET /form2
)- Display the form2
- Submit (
POST /form2
)