Reputation: 2275
I have number of forms with same structure. They all are same for user data. the id for these forms are addComment1, addComment2, addComment3, and etc. I want to define form validation for each of them. but i don't know their numbers. I want to use regular expression for defining them in form_validation.php. They all have the same structure and form_validation function is same for all of them. How can I use regular expression to do it?
Upvotes: 0
Views: 2728
Reputation: 2428
$this->form_validation->set_rules('field name', 'human name', 'regex_match[expression]');
http://ellislab.com/forums/viewthread/195050/
Use search.
Upvotes: 5