Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserEmail's MIN_LENGTH, MAX_LENGTH are not used #40

Open
marwq opened this issue Nov 25, 2024 · 0 comments
Open

UserEmail's MIN_LENGTH, MAX_LENGTH are not used #40

marwq opened this issue Nov 25, 2024 · 0 comments

Comments

@marwq
Copy link

marwq commented Nov 25, 2024

class UserEmail(ValueObject[str]):
    value: str

    MAX_LENGTH = 100
    MIN_LENGTH = 6

    def _validate(self) -> None:
        try:
            validate_email(self.value, check_deliverability=False)
        except EmailNotValidError as exc:
            raise InvalidUserEmailError from exc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant