One question about the validation error message |
[eluser]luffy[/eluser]
The code below: $this->form_validation->set_rules('username', 'username', 'required'); $this->form_validation->set_rules('content', 'content', 'required'); $this->form_validation->set_message('required', 'custom message'); For example: If I want to show the "username error" and "content error" How to use the set_message? Because their rule is the same.
[eluser]Flemming[/eluser]
This post might help you! ... http://ellislab.com/forums/viewthread/45589/ Edit: but rather than hack the validation library I would extend it with MY_Form_validation http://ellislab.com/codeigniter/user-gui...aries.html - see the section on extending core libraries
[eluser]imn.codeartist[/eluser]
To do that you need to modify Form_validation class
[eluser]luffy[/eluser]
[quote author="flemming" date="1255537785"]This post might help you! ... http://ellislab.com/forums/viewthread/45589/ Edit: but rather than hack the validation library I would extend it with MY_Form_validation http://ellislab.com/codeigniter/user-gui...aries.html - see the section on extending core libraries[/quote] Why doesn't the development team add the code into the validation library ? |
Welcome Guest, Not a member yet? Register Sign In |