Correctly apply the error class to all of the different types of input

As discussed in #61, the `error` class is not getting correctly applied to all inputs, because some inputs (e.g. text_field) pass the html class option in the `options` hash, while others (e.g. select) pass it in a seperate `html_options` hash.

This pull request hopefully addresses this and adds tests.