Validating single form field with CodeIgniter
Posted
by iamdadude
on Stack Overflow
See other posts from Stack Overflow
or by iamdadude
Published on 2010-03-19T19:01:59Z
Indexed on
2010/03/19
19:41 UTC
Read the original article
Hit count: 206
Is there a quick way to validate a single form field with CodeIgniter to see whether or not that field matches a set of rules? There's the $this->form_validation->run();, but that will return either TRUE or FALSE for the whole form, and that's just not what I'm looking for. For example, if I only wanted to check if the email was valid, checking the whole form is not going to get me the result I'm looking for.
I looked through the documentation but couldn't find anything like $this->form_validation->run(); that accepts one parameter and returns TRUE or FALSE if it's valid.
© Stack Overflow or respective owner