Input data validation.