validation added to input field