Tutorial :Using CodeIgniter built-in form validator class without an actual form submission


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!


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.


From the manual, under the section rule reference,

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »