[feat] add input validation