Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Url types are not aware of extension during validation #1555

Description

@alaeddine-13

Url types do not perform validation on the url extension. For instance, if a url has extension to an audio file (.wav), ImageURL can still accept it.

in the screenshot below, when a field is defined like this item: Union[ImageUrl, AudioUrl, str], when it is initialized like this : MyClass(item='link to audio') it will be validated against a ImageUrl. This is because ImageUrl considers a .wav file a valid image

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions