Codeigniter regex_match with Comparison
11:52 11 Sep 2015

I have this regex_match like -

$this->form_validation->set_rules('oper_nic', 'NIC', 'trim|required|min_length[10]|regex_match[/^[0-9]{9}[vVxX]$/]');

It validate 9 number followed by one letter that is v, V, x or X.

I need to combine the above validation to an another field witch which can enter year like 1988.and validate (88) value in both fields at the same time.

Ex : Value 880989898V (According to the expression this is correct)

Another field I am entering for a separate text field the value for it is - 1993

According to the value 1993 is wrong and 1988 should be correct

because 1st value start with 88 and other value ends with 88.

How can I write a code using CodeIgniter to achieve this.

php regex codeigniter validation submission