Skip to content

Conversation

@kilias07
Copy link
Collaborator

@kilias07 kilias07 commented Dec 4, 2025

No description provided.

…alidator` modules for better code organization.

- Enhanced password validation with specific requirements and visual hints.
- Added `clsx` dependency for conditional class management.
@vercel
Copy link

vercel bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
mercurvendor-development Ready Ready Preview Comment Dec 4, 2025 9:12am
mercurvendor-testing Ready Ready Preview Comment Dec 4, 2025 9:12am
vendor-panel Ready Ready Preview Comment Dec 4, 2025 9:12am
vendor-sandbox Ready Ready Preview Comment Dec 4, 2025 9:12am

@kilias07 kilias07 changed the title MM2-2094 fix—Refactored register page to extract RegisterSchema and PasswordValidator modules for better code organization. - Enhanced password validation with specific requirements and visual hints. - Added clsx dependency for conditional class management. MM2-2094 fix—Refactored register page to extract RegisterSchema and PasswordValidator modules for better code organization. Dec 10, 2025

return (
<Container className="p-2 flex flex-col gap-y-1">
<p
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could be extracted to

const rules = [
    { key: 'chars8', label: 'At least 8 characters' },
    ...rest of keys
]

and later mapped through to not duplicate paragraphs, icons, styles, etc

from the other side it's small and easy to maintain, so it depends on you

newPasswordError['8chars'] ? 'text-red-700' : 'text-green-700'
)}
>
<CheckCircle /> At least 8 characters
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add translations

password: z.string().min(8, { message: "Password should have at least 8 characters" }),
confirmPassword: z.string()
}) .refine((data) => data.password === data.confirmPassword, {
message: "passwords don't match",
Copy link
Collaborator

Choose a reason for hiding this comment

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

First letter is missing upper case

@kacpergumieniuk kacpergumieniuk changed the base branch from test to development December 11, 2025 22:55
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.

3 participants