Pular para conteúdo

Validator

EmailFormatError

Bases: Exception

Custom error that is raised when a email address doesn't have the rigth format.

Source code in validator/validator.py
23
24
25
26
27
28
29
class EmailFormatError(Exception):
    """Custom error that is raised when a email address doesn't have the rigth format."""

    def __init__(self, value: str, message: str) -> None:
        self.value = value
        self.message = message
        super().__init__(message)

HTMLFormatError

Bases: Exception

Custom error that is raised when a html document doesn't have the rigth format.

Source code in validator/validator.py
32
33
34
35
36
37
38
class HTMLFormatError(Exception):
    """Custom error that is raised when a html document doesn't have the rigth format."""

    def __init__(self, value: str, message: str) -> None:
        self.value = value
        self.message = message
        super().__init__(message)

IdBotconversaMissingError

Bases: Exception

Custom error that is raised when a id to botconversa contact doesn't exist.

Source code in validator/validator.py
41
42
43
44
45
46
47
class IdBotconversaMissingError(Exception):
    """Custom error that is raised when a id to botconversa contact doesn't exist."""

    def __init__(self, value: str, message: str) -> None:
        self.value = value
        self.message = message
        super().__init__(message)

PhoneFormatError

Bases: Exception

Custom error that is raised when a phone number doesn't have the rigth format.

Source code in validator/validator.py
14
15
16
17
18
19
20
class PhoneFormatError(Exception):
    """Custom error that is raised when a phone number doesn't have the rigth format."""

    def __init__(self, value: str, message: str) -> None:
        self.value = value
        self.message = message
        super().__init__(message)