Tech, Gaming and Food Enthusiast
Posts tagged Validation
Ajax callback validation routines with CodeIgniter
Mar 21st
The CodeIgniter Form_Validation library is an extremely useful tool especially the ability to extend all core routines. Some validation requires real time PHP & MySQL processing, for example checking an email against those already registered with your site.
To use a PHP function to return values to the jQuery validate function, the only important theory to understand is that the function needs to echo, not return. Returning values will not send the output to the DOM and so the validation routines will not know what to do with it.
Extending CodeIgniter’s validation routines
Mar 16th
One of the primary issues that developers avoid is code repetition, especially when more that 3 instances exist. When developing I follow the guidelines best explained by:
If you do it more than 3 times, functionalise. If you do it more than 10 times, refactor.
My most recent project is built using the CodeIgniter (CI) framework which I was extremely impressed with. The level of abstraction and ability to extend makes CI a very appealing solution to any developer.