Add InputValidation class and tests