Validate input on the way