#847 Refactor .hasError() and .validate() methods. #954 Add 'beforevalidate' event.
#900 Refactor .hasError() and .validate() methods.