extract input validation