complete input validation