Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pages/signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ export default function Signup() {
<StFormWrapper>
<StSignupImage src={imgList[formDataKeyIndex]} alt="νšŒμ›κ°€μž… 첫 단계" />
<StSignupHeading2>λ‚˜λ§Œμ˜ μ„œμž¬λ₯Ό λ§Œλ“œλŠ” μ€‘μ΄μ—μš”!</StSignupHeading2>
<StSignupParagraph>λ‹Ήμ‹ μ˜ {formDataKeyData[formDataKeyIndex]}을 μž…λ ₯ν•΄ μ£Όμ„Έμš”.</StSignupParagraph>

{formDataKeyData[formDataKeyIndex] == "λ‹‰λ„€μž„" ? (
<StSignupParagraph>μ œκ°€ μ—¬λŸ¬λΆ„μ„ μ–΄λ–»κ²Œ λΆ€λ₯΄λ©΄ λ κΉŒμš”?</StSignupParagraph>
) : (
<StSignupParagraph>λ‹Ήμ‹ μ˜ {formDataKeyData[formDataKeyIndex]}을 μž…λ ₯ν•΄ μ£Όμ„Έμš”.</StSignupParagraph>
)}

<StForm onSubmit={handleSubmit(submitForm)}>
<SignupForm
register={register}
Expand Down
6 changes: 6 additions & 0 deletions util/check.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const EMAIL_REGEX =
/^(([^<>()\].,;:\s@"]+(\.[^<>()\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/i;

const NICKNAME_REGEX = /^(?=.*[a-z0-9κ°€-힣])[a-z0-9κ°€-힣]{2,10}$/i;

Comment on lines +4 to +5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘πŸ‘

const INVALID_PWD_CHAR_LIST: { [key: string]: string } = {
",": "반점(,)",
'"': 'μŒλ”°μ˜΄ν‘œ(")',
Expand Down Expand Up @@ -34,6 +36,10 @@ const nicknameErrorPatterns: ErrorCondition = {
value: true,
message: "λ‹‰λ„€μž„μ„ μž…λ ₯ν•΄μ£Όμ„Έμš”.",
},
pattern: {
value: NICKNAME_REGEX,
message: "2-10자 μ΄λ‚΄μ˜ 영문/ν•œκΈ€/숫자둜 μž…λ ₯ν•΄μ£Όμ„Έμš”.",
},
};

export const passwordErrorPatterns: ErrorCondition = {
Expand Down