Form Validation Error Messages for rule 'matches' - 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 Error Messages for rule 'matches' (/showthread.php?tid=13229) |
Form Validation Error Messages for rule 'matches' - El Forum - 11-15-2008 [eluser]mradlmaier[/eluser] Hi, I am posting this here because I am not sure if this is a bug or if I am missing something. I tried and modified the example in the userguide: Quote:myform.php As you can see I change the name of the first password field to 'Passwort' (That`s german.) form.php Code: <?php I guess the expected behaviour for failing the 'matches' rule would be to display: The Passwort Bestägung field does not match the Passwort field. But it displays: The Passwort Bestägung field does not match the password field. Is this a bug or do I miss something here? On another note, the ideal behaviour should be to display the "human" name of the field to match, wouldn`t it? Michael Form Validation Error Messages for rule 'matches' - El Forum - 11-15-2008 [eluser]Pascal Kriete[/eluser] You have a typo in there (2 actually - Bestätigung). The rule should read: Code: $this->form_validation->set_rules('password', 'Passwort', 'required|min_length[4]|max_length[12]'); Form Validation Error Messages for rule 'matches' - El Forum - 11-15-2008 [eluser]mradlmaier[/eluser] Hi inparo, You are right, there were some typos. So I changed it to Code: $this->form_validation->set_rules('username', 'Benutzername', 'required|min_length[4]|max_length[12]'); and it isplays like expected: The Passwort Bestägung field does not match the Passwort field. Neverless, I would like that the "human" name would be displayed instead the field name for the field to match... any ideas? Michael Form Validation Error Messages for rule 'matches' - El Forum - 11-15-2008 [eluser]Pascal Kriete[/eluser] Re-editing this post. I have it figured out now. It works fine, but in your original example your matches rule referenced 'password', which didn't have a human name. |