Validators

validators.validate_url()

Validates whether a string is a valid url or not

Parameters:

value (str) – url

Raises:

ValidationError – raised when an invalid url is passed

Return type:

str

validators.validate_phone_number()

Validates the phone number based on E.164 format

https://www.twilio.com/docs/glossary/what-e164

Returns validated value

Parameters:

value (str) – phone number

Raises:

ValidationError – raised when the number isn’t valid

Return type:

str