Fix attribute validation for complex type.