Custom Validation Function |
(09-22-2015, 06:52 AM)kilishan Wrote: A slightly more "proper" way to do it would be to extend the Form_validation library in a MY_Form_validation file. Add the functions to that, and then you should be able to use it like: I would advise you to use this approach. First of all, it keeps all your code related to form validation together. Second, you can easily override the default rule methods with your own. Here is an example of a MY_Form_validation.php: PHP Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
Messages In This Thread |
Custom Validation Function - by ardavan - 09-22-2015, 06:28 AM
RE: Custom Validation Function - by kilishan - 09-22-2015, 06:52 AM
RE: Custom Validation Function - by ardavan - 09-24-2015, 06:10 PM
RE: Custom Validation Function - by ardavan - 09-30-2015, 02:15 AM
RE: Custom Validation Function - by Martin7483 - 09-30-2015, 02:37 AM
RE: Custom Validation Function - by ardavan - 09-30-2015, 03:13 AM
RE: Custom Validation Function - by Martin7483 - 09-30-2015, 03:39 AM
RE: Custom Validation Function - by Martin7483 - 09-30-2015, 07:22 AM
|