You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test below fails with an error that is confusing as it is not giving an indication of the incorrect origin type, it contains just the class name without the fully qualifying class. My input is a "URL", so I consider "URL input should be a string or URL" imprecise.
Would it be possible to distinguish between internal and external types somehow, maybe only in case of a naming conflict?
E pydantic_core._pydantic_core.ValidationError: 1 validation error for url['http','https']
E URL input should be a string or URL [type=url_type, input_value=URL('http://localhost:3000'), input_type=URL]
E For further information visit https://errors.pydantic.dev/2.4/v/url_type
Thanks for reporting this. I think it's a reasonable ask, and I'd be happy to review a PR making things more clear. I think the validation error message could be a bit more specific as well.
Skimming through the code, I noticed this requires changes to pydantic-core. My Rust knowledge might not be good enough to tackle this kind of task. This might change though. :)
Initial Checks
Description
The test below fails with an error that is confusing as it is not giving an indication of the incorrect origin type, it contains just the class name without the fully qualifying class. My input is a "URL", so I consider "URL input should be a string or URL" imprecise.
Would it be possible to distinguish between internal and external types somehow, maybe only in case of a naming conflict?
Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: