CodeIgniter Forums
Dual Validation Message - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Dual Validation Message (/thread-2112.html)



Dual Validation Message - El Forum - 07-17-2007

[eluser]Phunky[/eluser]
Im still trying to get to grips with CI and the whole MVC concept, so please bare with me Smile

Im wishing to throw out two errors when a form is submitted, one will be a grouped overview of errors with a in-depth explanation of what has going wrong, which would be where i use;
Code:
$this->validation->error_string;

But i would also like to hae some form of inline error highlighting be it a small * or even a bit of text stating "required" or "error"

Its at this point i get confused, how can i set two differnt validation errors for the same form field?


Dual Validation Message - El Forum - 07-17-2007

[eluser]Holger Lampe[/eluser]
You can also use the error messages like this:
Code:
<?php if ($this->validation->fieldname_error) : ?>
    <em>REQUIRED</em>
&lt;?php endif; ?&gt;



Dual Validation Message - El Forum - 07-17-2007

[eluser]Phunky[/eluser]
Yeah i thought of going down the route, wasn't 100% sure if it was best practise Big Grin

Thanks Holger!