validate input using html constraints api