![]() |
Form Validation - problem with some chars - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Form Validation - problem with some chars (/showthread.php?tid=51892) |
Form Validation - problem with some chars - El Forum - 05-22-2012 [eluser]Unknown[/eluser] Hi everyone! I have a problem with some polish chars. Model fragment: Code: ... Controller fragment: Code: $this->form_validation->set_rules('name', '"Imię"', 'trim|required|min_length[3]|alpha'); View fragment: Code: echo form_label('Imię', 'name'); I set a rule only aplha chars, so then I type character like ł, ą, ę it doesn't pass the validation. Of course in my database I have set 'ut8_general_ci' and in config database file. Form Validation - problem with some chars - El Forum - 05-22-2012 [eluser]SPeed_FANat1c[/eluser] You probably will have to extend form validation class, alpha rule, now it is:\ Code: function alpha($str) So thats why it is not valid I think. Or create your custom validation rule. Form Validation - problem with some chars - El Forum - 05-23-2012 [eluser]Unknown[/eluser] [quote author="SPeed_FANat1c" date="1337687398"]You probably will have to extend form validation class, alpha rule, now it is:\ Code: function alpha($str) So thats why it is not valid I think. Or create your custom validation rule.[/quote] Thanks. ![]() |