-
Notifications
You must be signed in to change notification settings - Fork 20
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
1 parent
64d1539
commit 13470ba
Showing
2 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { IsNotEmpty, IsString, Matches } from 'class-validator'; | ||
|
||
export class SendCodeDto { | ||
@IsNotEmpty() | ||
@IsString() | ||
@Matches(/^010-\d{4}-\d{4}$/, { | ||
message: '휴대전화 번호는 반드시 형식에 맞게 작성해야합니다.', | ||
}) | ||
phoneNumber: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { IsNotEmpty, IsString, Length, Matches } from 'class-validator'; | ||
|
||
export class VerifyCodeDto { | ||
@IsNotEmpty() | ||
@IsString() | ||
@Matches(/^010-\d{4}-\d{4}$/, { | ||
message: '휴대전화 번호는 반드시 형식에 맞게 작성해야합니다.', | ||
}) | ||
phoneNumber: string; | ||
|
||
@IsNotEmpty() | ||
@IsString() | ||
@Length(6, 6, { | ||
message: '코드는 여섯자리입니다.' | ||
}) | ||
code: string; | ||
} |