views:

25

answers:

2

Is it possible to validate a set of data (an array) with the form validation class in CodeIdniter? i.e. when there his no form submitted.

If it's not possible, what other way could I validate this data using the set of validation rules written in form_validation config file?

Thanks in advance!

+1  A: 

I think you can validate any data using form validation, I have never tried, but it should work if you assign to $_POST array values manually (without submitting form) and then try to validate it.

KoKo
That did the trick! Thanks a lot!
davis
+1  A: 

From the manual, under the section rule reference,

Note: These rules can also be called as discrete functions. For example:

$this->form_validation->required($string);
yearofthetiger