Fixed bug that prevented errorClass from being attached to erroneous fields