Add code to validate input value