4.0.3 brings improved handling of required fields and errors during commenting. There is a new tag for your comments-form called <txp:comments_error class="comments_error" break="br" wraptag="div" /> which will list all the error-messages related to the comment. This can include Textpattern’s own messages for missing required fields (like e-mails, or comment body) or messages from comment-plugins. The Update-Procedure should add this tag to your default comments_form, but if you are using additional forms or want to customize the output, you can addchange it yourself. Additionally there is also a new tag: <txp:if_comments_error>.
Styling can be achieved via CSS. You can also highlight the faulty input-fields themselves, because they will also get an additional class assigned called “comments_error”, when the user needs to re-check that field. So simple example rules would be:
.comments_error { background-color: #ffa }
div.comments_error { border: 1px solid #cc8; padding : 0.3em;}
This will give all comments_error related fields a slightly yellow background and will additionally emphasize the div with the error-message through a border.

