0

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?

4

1 回答 1

5
$this->form_validation->set_rules('field name', 'human name', 'regex_match[expression]'); 

http://ellislab.com/forums/viewthread/195050/

使用搜索。

于 2012-07-19T14:02:21.103 回答