Welcome Guest, Not a member yet? Register   Sign In
form valiadation with other language
#1

[eluser]Unknown[/eluser]
Hi
My site is in french and I have a problem with the form validation; If I type a special a french accent (like "à") in my input on my form, it automatically call an error: the field is required... as if I didn't type anything...
I'm pretty sure that the problem comes from the accent but I don't know were I can set the default behavior to accept these accents!
Thanks
Hubert
#2

[eluser]Unknown[/eluser]
Hi. The webpage and the files are encoded in UTF-8? If you make a test typing echo $this->input->post (); before the form_validation test the data appears correctly?


And sorry for my english
#3

[eluser]Zaher Ghaibeh[/eluser]
you have to extend the form_validation class to overwrite the validations rules that you use to accept your FR chars.
and i think those problems can be found in a validations rules like alpha , alpha_num ... etc ..
Code:
function alpha($str)
    {
        return ( ! preg_match("/^([a-z])+$/i", $str)) ? FALSE : TRUE;
    }




Theme © iAndrew 2016 - Forum software by © MyBB