![]() |
form validation - 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 (/showthread.php?tid=28781) |
form validation - El Forum - 03-21-2010 [eluser]Ngulo[/eluser] hi everyone i'm using these code to do the user registration without 2 distinct views ,but to do all in the same view(Home_view): controller: Code: class Home extends Controller and home_view: Code: <?php echo form_open('home');?> it works really great ![]() is not definitive code i have to upgrade and i have some questions about it why does form_validation library doesn't works as the validation one? i can't use that ![]() again, i would like to know how to set my personal error_messages's text for any error input name? any suggest for my code? do you know a better way to do the registration in the same view page? thanks to all ![]() form validation - El Forum - 03-22-2010 [eluser]2think[/eluser] Not sure if this helps but since you said you need to upgrade and since forms are made a lot easier by this library, maybe you want to take a look at this excellent library that helps with forms here: http://ellislab.com/forums/viewthread/107861/ form validation - El Forum - 03-22-2010 [eluser]Ngulo[/eluser] thanks a lot but for now i'm able only to say hello world in CI so i have to understand the framework's basics , later i will try new features but now i'm still trying to configure my own error_messages on each input how can i do to have my own messages displaying on each name error(username_error,password_error,etc ...)? joking, maybe : $this->validation->username_error('hello this is username error');?? thanks again ![]() form validation - El Forum - 03-22-2010 [eluser]danmontgomery[/eluser] Any reason you're using validation instead of form_validation? validation is deprecated, and shouldn't be used. Either way, you can use set_message(). http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html#settingerrors Code: $this->form_validation->set_message('username', 'This is my username error'); form validation - El Forum - 03-22-2010 [eluser]Ngulo[/eluser] hi noctrum , i was saying before that if i use this same code , loading form_validation instead of validation library's ,the apps doesn't works :O i don't know why ,maybe when i make the changes to load the other library i forget something important ,i really don't know :O anyway thanks a lot for the example to change form errors ,was all i need to know ![]() |