Add tests for validation errors