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

Show all password restrictions at once #9

Merged
merged 4 commits into from
Jan 9, 2025

Conversation

cmbbigis
Copy link
Collaborator

Требования к паролю показываются всегда. Если пароль неверный, подсказка о требованиях становится красной.

@cmbbigis cmbbigis force-pushed the ShowAllPasswordRequirementsAtOnce branch from ffb167c to 6854c6f Compare November 28, 2024 08:52
@cmbbigis cmbbigis changed the title Показывать все требования к паролю сразу Show all password restrictions at once Nov 28, 2024
.min(5, passwordRequirements)
.regex(/[a-z]/, passwordRequirements)
.regex(/[A-Z]/, passwordRequirements)
.regex(/[0-9]/, passwordRequirements);
Copy link
Owner

Choose a reason for hiding this comment

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

можно объединить все регэксы

@@ -214,6 +214,7 @@ const RegisterForm = ({ id, onSubmit }: AuthFormProps) => {
size="lg"
label="Пароль"
placeholder="Пароль"
requirements={"Минимальная длина пароля 5 символов. Пароль должен содержать строчную английскую букву, заглавную английскую букву и цифру."}
Copy link
Owner

Choose a reason for hiding this comment

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

можно заиспользовать текст из auth-schemas.ts, чтобы они потом не разъезжались при возможных изменениях

@cmbbigis cmbbigis force-pushed the ShowAllPasswordRequirementsAtOnce branch from 6854c6f to c27b6a0 Compare January 7, 2025 13:00
@cmbbigis cmbbigis requested a review from wasadus January 7, 2025 13:19
@wasadus wasadus merged commit ee354b8 into master Jan 9, 2025
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