- Removed deprecated files and components from the BFF application, including various auth and catalog services, enhancing code clarity. - Updated package.json scripts for better organization and streamlined development processes. - Refactored portal components to improve structure and maintainability, including the removal of unused files and components. - Enhanced type definitions and imports across the application for consistency and clarity.
22 lines
753 B
TypeScript
22 lines
753 B
TypeScript
import { IsEmail, IsString, MinLength, Matches } from "class-validator";
|
|
import { ApiProperty } from "@nestjs/swagger";
|
|
|
|
export class SetPasswordDto {
|
|
@ApiProperty({ example: "user@example.com" })
|
|
@IsEmail()
|
|
email: string;
|
|
|
|
@ApiProperty({
|
|
example: "NewSecurePassword123!",
|
|
description:
|
|
"Password must be at least 8 characters and contain uppercase, lowercase, number, and special character",
|
|
})
|
|
@IsString()
|
|
@MinLength(8, { message: "Password must be at least 8 characters long" })
|
|
@Matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]*$/, {
|
|
message:
|
|
"Password must contain at least one uppercase letter, one lowercase letter, one number, and one special character",
|
|
})
|
|
password: string;
|
|
}
|