![]() |
Ag Auth - Custom Validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Ag Auth - Custom Validation (/showthread.php?tid=56189) |
Ag Auth - Custom Validation - El Forum - 12-02-2012 [eluser]bjuneau[/eluser] I have Ag Auth up and running... However, I am a bit lost with how to wrap a <div> w/ specific styles around my validation messages? I'm somewhat familiar with PHP but still learning. Below is what Ag Auth gives me by default for validation. I would like to place a <div></div> w/ the following styles around the form errors when they're called. Code: .errors {background-color: #F2F2F2;border: 1px solid #CCCCCC;color: #BE320D;padding: 10px;} Code: <?php echo form_error('username'); ?> Thanks for the help, much appreciated! Ag Auth - Custom Validation - El Forum - 12-02-2012 [eluser]bjuneau[/eluser] Oh and not sure if this is the best way... Code: <?php if(validation_errors()) : ?> Ag Auth - Custom Validation - El Forum - 12-02-2012 [eluser]bjuneau[/eluser] So I have another question as I dive deeper into things... I see with Ag Auth it places some, not all, of its error messages in the "message.php" (view) and not inline like the others... Sigh... How can I have all error messaging coincide on the same page rather than loading a separate page? In the "MY_Controller.php": Code: public function login($redirect = NULL) Ag Auth - Custom Validation - El Forum - 12-03-2012 [eluser]Aken[/eluser] I have no experience with Ag Auth, but you can change the HTML surrounding errors easily. http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html#errordelimiters |