add check validity to triple click prevention behavior

added checkValidity function for html5 validation