Search code examples
codeignitervalidationcodeigniter-2

CodeIgniter load custom form_validation config file


I am using CodeIgniter 2.1.3, and HMVC by Wiredesignz.

How can I include a custom form_validation configuration file in the module's folder (in application/modules/user/config/form_validation.php) as opposed to the central config folder (application/config/form_validation.php)?

Edit I have accepted Salvador's answer, due to his suggestion in the comments.


Solution

  • Why in config?

    There is a better way, you can use it in application/libaries/MY_form_validation.php

    There you can safely modify the form_validation class o add new features.

    Check this or this