How to add a specific class to an input which has generated a form error?
- by Kamil Mroczek
I want to add a specific class to an input if an error is genereted by the input.
For example, if input is empty and has required validator it shouls look like this:
<dd id="login-element">
<input type="text" name="login" id="login" value="" class="input-text error" />
<ul class="errors">
<li>Value is required and can't be empty</li>
</ul>
</dd>
class="input-text error"
Please tell me how to do that.