mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:14:54 +00:00
add sign up password validator
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
|
import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
|
||||||
|
import { IsPasswordStrong } from 'src/validators/password.validator';
|
||||||
|
|
||||||
export class UserSignUpDto {
|
export class UserSignUpDto {
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
@ -16,6 +17,10 @@ export class UserSignUpDto {
|
|||||||
})
|
})
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
|
@IsPasswordStrong({
|
||||||
|
message:
|
||||||
|
'password must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, one numeric digit, and one special character.',
|
||||||
|
})
|
||||||
public password: string;
|
public password: string;
|
||||||
|
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
|
|||||||
Reference in New Issue
Block a user