Added support for generating a CSS class for valid fields