[eluser]devbro[/eluser]
because of the syntax of set_rules() it is no possible to use regex strings.
Here is what I thought to go around it:
1. extends form_validation
2. add a function like:
Code:
$this->form_validation->add_regex_string('name','regex_string');
This function will store the given regex_string inside an internal array.
and add this rule as well
Code:
function test_regext($str,$regex_name)
This rule will look at inside array to find a matching regex_name. if so it will test it using preg_match()
and returns the result