-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(account): Add routes parameters class validator
- Loading branch information
1 parent
dcc9716
commit ab69131
Showing
13 changed files
with
792 additions
and
389 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { IsDefined, IsEmail, IsNotEmpty, IsString } from "class-validator"; | ||
|
||
export class EmailParameterDTO { | ||
@IsDefined() | ||
@IsString() | ||
@IsNotEmpty() | ||
@IsEmail() | ||
public email: string; | ||
} | ||
|
||
export class PasswordParameterDTO { | ||
@IsDefined() | ||
@IsString() | ||
@IsNotEmpty() | ||
public password: string; | ||
} | ||
|
||
export class UsernameParameterDTO { | ||
@IsDefined() | ||
@IsString() | ||
@IsNotEmpty() | ||
public username: string; | ||
} |
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
Oops, something went wrong.