-
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.
* add :: local signup api * add :: local login api * modify :: add @UseFilters
- Loading branch information
Showing
7 changed files
with
114 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 +1,30 @@ | ||
import { IsNotEmpty, IsNumber, IsString, Matches } from "class-validator"; | ||
|
||
export class TokenResponse { | ||
accessToken: string; | ||
} | ||
|
||
export class SignUpRequest { | ||
@Matches(/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/, { | ||
message: '유효한 이메일 주소를 입력해주세요.', | ||
}) | ||
email: string; | ||
|
||
@Matches(/^(?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{5,}$/, { | ||
message: '소문자, 숫자, 특수문자를 포함하여 5자 이상으로 입력해주세요.' | ||
}) | ||
password: string; | ||
@IsNotEmpty() | ||
@IsString() | ||
nickname: string; | ||
@IsNotEmpty() | ||
@IsNumber() | ||
age: number; | ||
} | ||
|
||
export class LoginRequest { | ||
@IsNotEmpty() | ||
email: string; | ||
@IsNotEmpty() | ||
password: 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
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