Better input validation rules