Welcome Guest, Not a member yet? Register   Sign In
When are the config_rules loaded for form_validation library?
#2

[eluser]Pascal Kriete[/eluser]
When a config file has the same name as a library, the config array is automatically passed to the library constructor.

To get them yourself you have two options.

1. Steal it from the library:
Code:
// Only works if the lib is loaded
$this->load->library('form_validation');
$rules = $this->form_validation->_config_rules;

2. Load it through the config library:
Code:
$this->config->load('form_validation', TRUE);
$rules = $this->config->item('form_validation');

Happy Holidays!


Messages In This Thread
When are the config_rules loaded for form_validation library? - by El Forum - 12-24-2008, 03:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB