-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
@yozachar
Description
- Succeeds:
Suggestions are welcome:
validators/src/validators/uri.py
Lines 24 to 41 in cdc987d
@validator
def uri(value: str, /):
"""Return whether or not given value is a valid URI.
Examples:
>>> uri('mailto:example@domain.com')
# Output: True
>>> uri('file:path.txt')
# Output: ValidationError(func=uri, ...)
Args:
value:
URI to validate.
Returns:
(Literal[True]): If `value` is a valid URI.
(ValidationError): If `value` is an invalid URI.
"""