[eluser]hugle[/eluser]
Hello.
I currently whore a little extention to form_validation
I called it : if_exists
example below:
Code:
$this->form_validation->set_rules('iam', 'I am', 'if_exists[iam.id]');
I wonder if I can pass variable from $_POST request into this extention?
for example I would like to pass the value of $_POST['country'] to the:
Code:
$this->form_validation->set_rules('iam', 'I am', 'if_exists[iam.id]');
I found this one working:
Code:
$country = $_POST['country'];
$this->form_validation->set_rules('iam', 'I am', "if_exists[iam.id.$country]");
Maybe there is more clever way to do this ?
Using some "native" functions of form validator or something similar?
Thank you !