Welcome Guest, Not a member yet? Register   Sign In
A Problem On Form Validation Class
#1

[eluser]Unknown[/eluser]
I have a problem on form validation class.
I'm Chinese and when I use form validation class to check chinese.The problem comes.
One Chinese character as two english characters.Then ten Chinese characters should have the same length of 20 english characters.
But CI gives me the same length.
max_length[10], this rule can let 10 chinese character pass.It's not right.
I want to know how to fix it.
Thanks very much.
Sorry for my poor english.
#2

[eluser]xwero[/eluser]
which version are you using? the form_validation class in the last versions supports multibyte languages using the mb_x php functions
#3

[eluser]Unknown[/eluser]
Thanks,I use a callback function to deal with it.A chinese char can have different length in different charset.So I write my own function to fix it .
THX~!




Theme © iAndrew 2016 - Forum software by © MyBB