Validation error on first view - 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: Validation error on first view (/showthread.php?tid=37646) |
Validation error on first view - El Forum - 01-16-2011 [eluser]Mutsop[/eluser] Hi, For some reason I get Undefined property errors of my validations... controller: Code: <?php View: Code: <section id="content"> So on each of my <?php echo $this->validation->xxxxx; ?> and _error I get the Undefined property error... As you can see, I do declare them trhough the rules and fields. So why? Validation error on first view - El Forum - 01-16-2011 [eluser]cideveloper[/eluser] Do you get the errors the first time you load the page and not when you submit? Your index function does not have validation fields set. I dont know why everyone seems to be breaking the form validation into multiple functions. Is there a specific reason for this? Look at this post where I show form validation working perfectly. Validation error on first view - El Forum - 01-16-2011 [eluser]Mutsop[/eluser] Well I've been told many times to program like that. To be honest, there are so many ways you can program I just don't know how to anymore But I guess for such small script it isn't necessary. And yes it is on the first visit I get this code. And now I do see where my problem lies... Thanks a bunch |