Added support for input validation