How to remove 'error' class from form field?
_form_set_class() is called from a bunch of different theme functions, including


theme_checkbox()
theme_fieldset()
theme_file()


(the rest are here)

You can override whichever of those functions you need to in your theme by renaming the function as (e.g.)

function MYTHEME_checkbox($vars) {


Then copy in the original code from the function, remove the call to _form_get_class(), and replace it with whatever makes sense for your use case.