-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { Transform } from 'class-transformer'; | ||
import { IsEmail, Matches } from 'class-validator'; | ||
|
||
export class EmailVerificationDto { | ||
|
@@ -10,6 +11,7 @@ export class EmailVerificationDto { | |
type: String, | ||
example: '[email protected]', | ||
}) | ||
@Transform(({ value }) => value.toLowerCase()) | ||
email: string; | ||
@Matches(/^[0-9]{6}$/, { | ||
message: 'Code must be a 6 digit number', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Global, Module } from '@nestjs/common'; | ||
|
||
@Global() | ||
@Module({}) | ||
export class CommonModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { PipeTransform, Injectable } from '@nestjs/common'; | ||
|
||
@Injectable() | ||
export class LowercasePipe implements PipeTransform { | ||
transform(value: string) { | ||
return value.toLowerCase(); | ||
} | ||
} |