better tests for validation errors