Skip to content

Level 3#4

Open
MagerOK wants to merge 5 commits intomainfrom
level_3
Open

Level 3#4
MagerOK wants to merge 5 commits intomainfrom
level_3

Conversation

@MagerOK
Copy link
Copy Markdown
Owner

@MagerOK MagerOK commented Oct 4, 2023

No description provided.

Copy link
Copy Markdown

@Melevir Melevir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хорошечно!

return 5 <= len(full_name) <= 256

def validate_email(self, email: str) -> bool:
pattern = r"^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Погляди, есть ли чего готового в джанге шоб самому не изообретать

try:
int(age)
return True
except TypeError or ValueError:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почитай, как надо писать except если перехватываешь несколько исключений.

А ещё лучше вообще избавься от него – у строки есть метод isdigit, который делает то шо надо

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

Successfully merging this pull request may close these issues.

2 participants