model form builder: add error class to invalid fields