Form Validation and Regexp |
[eluser]Unknown[/eluser]
You can use it the same way you would use any other validation rule. Code: $this->form_validation->set_rules('field name', 'human name', 'regex_match[expression]'); Replace 'expression' with the regular expression from your database. http://ellislab.com/codeigniter/user-gui...ationrules However, if your regular expression contains square brackets then you need to use a callback. There is some more info in this thread: http://ellislab.com/forums/viewthread/185601/ I am not sure why this validation function isn't documented in the user guide. Can anyone provide any insight? |
Messages In This Thread |
Form Validation and Regexp - by El Forum - 07-26-2011, 07:48 AM
Form Validation and Regexp - by El Forum - 07-26-2011, 10:01 AM
Form Validation and Regexp - by El Forum - 07-27-2011, 08:49 PM
|