Update password validation rules and dependencies
- Updated the version of the ThreeXui.Net package from 1.0.0 to 1.0.1. - Enhanced password validation in ChangePasswordCommandValidator and RegisterCommandValidator to require at least one uppercase letter and one digit, with a custom error message in Russian. - Updated the password validation in RegisterForm and ChangePasswordForm to match the new requirements, ensuring consistency across the application.
This commit is contained in:
@@ -12,7 +12,10 @@ import { changePassword } from '@/features/auth/api'
|
||||
|
||||
const schema = z.object({
|
||||
currentPassword: z.string().min(1),
|
||||
newPassword: z.string().min(8),
|
||||
newPassword: z
|
||||
.string()
|
||||
.min(8)
|
||||
.regex(/^(?=.*[A-Z])(?=.*[0-9]).+$/),
|
||||
})
|
||||
|
||||
type FormValues = z.infer<typeof schema>
|
||||
|
||||
Reference in New Issue
Block a user