Simplified input validation.