Add the checkValidity function in hand-logic