Strange use of class names in renderwitherror

When a control is invalid the renderwithname will render a span with class error
the renderwitherror function will render a span with class warning. 

I think this has to be changed depending on an error or a warning. And it should be consistent across functions.