Welcome Guest, Not a member yet? Register   Sign In
code igniter form_validation language translate help needed
#1

[eluser]johansonevR[/eluser]
hello,
I want to translate my web site from english to bulgaria->cyrillic fonts. The lang files are not a problem.
The problem is with the form_validation class: when i initiate
Code:
form_validation->set_rules('required|alha_numeric')
And especially the line from form_validation.class.php
Code:
return ( ! preg_match("/^([a-z0-9])+$/i", $str)) ? FALSE : TRUE;
CI is doing a regex against english chars only, and my form cannot validate in other languages.
For example i change the line to
Code:
return ( ! preg_match("/^([a-zа-я0-9])+$/i", $str)) ? FALSE : TRUE;
and it gives me an error.
How do i fix this ?




Theme © iAndrew 2016 - Forum software by © MyBB