Skip to content

Url types are not aware of extension during validation #1555

@alaeddine-13

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions