Welcome Guest, Not a member yet? Register   Sign In
Display form validation errors in an unordered list in a proper way.
#5

[eluser]Bramme[/eluser]
[quote author="elvicmic" date="1294281755"]This is the code I place in my view:

Code:
<?php if (validation_errors()): ?>
    <ul>
        &lt;?php echo validation_errors('<li>', '</li>'); ?&gt;
    </ul>
&lt;?php endif; ?&gt;
[/quote]

I guess I could do that, but that would mean I have to put the <ul> tags in my feedback message, which could also accept other things besides <li> tags.

At the moment I think I'll just start creating a buttload of helper functions.

The thing is that I'm putting html everywhere at the moment (my main library, my controller, my views), I'm not even comfortable with that. And if I have to start putting html in my views too...

I should also start using a language file now, while there aren't that many language strings littered everywhere yet.


Messages In This Thread
Display form validation errors in an unordered list in a proper way. - by El Forum - 01-05-2011, 03:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB