rickharrison/validate.js — pull request #19 by AlanHietala (2012-02-14 16:00:28+00:00)
Title: Added input highlighting support

I've added input highlighting support to the library. Feel free to pull this if you don't already have an implementation underway.

The class that is added to the input is by default "error" but it can be changed with the setErrorClass(className) function. This is chainable like the other public setters in the library. The default is set in the defaults.errorClass property.

I've also done a bit of refactoring to break the _validate method into some smaller functions with only one responsibility. This made it easier to test and made it easier to integrate the input highlighting.