Change validate to a member function.

Changed the text input to use _.extend to add inheritable methods.
Re-implemented validate as a member function.