Validate the given HTTP URL. Args: value: The URL to validate, or `None` to skip validation. Raises: pydantic.ValidationError: If the URL is malformed or its scheme is not `http`/`https`.
(value: str | None)
| 55 | |
| 56 | |
| 57 | def validate_http_url(value: str | None) -> str | None: |
| 58 | """Validate the given HTTP URL. |
| 59 | |
| 60 | Args: |
| 61 | value: The URL to validate, or `None` to skip validation. |
| 62 | |
| 63 | Raises: |
| 64 | pydantic.ValidationError: If the URL is malformed or its scheme is not `http`/`https`. |
| 65 | """ |
| 66 | if value is not None: |
| 67 | _HTTP_URL_ADAPTER.validate_python(value) |
| 68 | |
| 69 | return value |
| 70 | |
| 71 | |
| 72 | def filter_url( |
no outgoing calls