fix bug in IE7

Function validate() will throw an exception and break because HTML5 attribute "novalidate" is not supported by form element in IE7, so I add a try-catch block to give a warning instead of error on console.