Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
CodeIgniter Form Validation: From Start to Finish
Jul 06, 2017 @ 15:53:12

The NetTuts.com site has a new tutorial posted covering form validation in CodeIgniter "from start to finish" showing you how to use the built-in functionality to verify the information coming from your users.

As a web application developer, form validation is a crucial part of your work, and it should not be underrated as it could lead to security flaws in your application. You should consider it a must if you're striving to provide a professional end user experience.

In this article, we'll go through the built-in form validation library in the CodeIgniter framework. Here are the highlights of today's article: [The use of ] basic form validation, cascading and prepping, custom error messages, custom validation callback, and validation configuration

They start off by covering some of the basic included rules using a simple controller and view. These checks include values being required, maximum length of text, alphanumeric only, valid email and checking that the value is a valid IPv4 address. The example also shows how to make use of the "cascading" rules and using the rules system to "prep" the data first. They walk through each line of the code that defines the rules talking about what it does and how they can be adjusted to fit your needs. They cover more in-depth how cascading and prepping work, how to customize error messages and create custom callback validation rules you can apply along with the standard ones.

tagged: codeigniter tutorial validation introduction cascade prep data custom message

Link: https://code.tutsplus.com/tutorials/codeigniter-form-validation-from-start-to-finish--cms-28768


Trending Topics: