![]() |
Hello!
Today I was working in more details with the valitaion. I choose the model to add the rules and messages. But while testing, I go always an error, when a German "Umlaut" was part of the text. I don't know how to solve this, I didn't find anything ![]() Here a short examle of the validation: PHP Code: 'street_no' => 'required|alpha_numeric_space|min_length[5]', PHP Code: Düsseldorfer Straße Has anyone an Idea hot to upgrade the validation? Or is there an other solution? Thank you!
I think you will need to use the regex_match rule and define a regex expression to include the German characters: https://codeigniter.com/user_guide/libra...able-rules
That was not as hard as I thougt. I saw regex in the docs, regex but regex is regex...
![]() So my working solution is now: PHP Code: 'surename' => 'required|regex_match[/[a-zA-Z ÄäÖöÜüß]/]|min_length[2]', // instead alpha_space ![]()
Yeah regex can be confusing, that's why I always use a regex website to test mine!
![]() |
Welcome Guest, Not a member yet? Register Sign In |