Let invalid form elements get class="field-with-error..."

I think it's better to add class="..." instead of a block element around the input when the validation fail.