-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
32 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,32 @@ | ||
//example | ||
|
||
const VALIDATION_MESSAGE_MAP: { | ||
[key: string]: { | ||
value?: RegExp; | ||
message: string; | ||
}; | ||
} = { | ||
id: { | ||
value: /^(?=.*[a-z])(?=.*\d)[a-z\d]{8,}$/, | ||
message: '영문 소문자, 숫자 조합 8자 이상 입력해주세요' | ||
}, | ||
email: { | ||
value: /^[_a-zA-Z0-9-.]+@[.a-zA-Z0-9-]+\.[a-zA-Z]+$/, | ||
message: '이메일 형식을 확인해주세요' | ||
}, | ||
password: { | ||
value: /^(?=.*[a-zA-Z])(?=.*[!@#$%^*+=-])(?=.*[0-9]).{8,16}$/, | ||
message: '8~16자의 영문 대/소문자, 숫자, 특수문자를 사용해 주세요.' | ||
}, | ||
confirmPassword: { | ||
message: '비밀번호를 확인해주세요.' | ||
}, | ||
failedLogin: { message: '아이디 또는 비밀번호를 확인해주세요.' }, | ||
failedFindId: { message: '잘못된 이메일입니다.' }, | ||
failedFindPassword: { message: '아이디가 존재하지 않습니다.' }, | ||
failedChangePassword: { message: '비밀번호를 다시 설정해 주세요.' }, | ||
duplicationId: { message: '중복된 아이디입니다.' }, | ||
duplicationEmail: { message: '중복된 이메일입니다.' } | ||
} as const; | ||
|
||
export default VALIDATION_MESSAGE_MAP; |