issue # 로그인, 회원가입, 비밀번호 초기화 Form schema 구현
This commit is contained in:
13
src/data/form/login.schema.ts
Normal file
13
src/data/form/login.schema.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import * as z from 'zod';
|
||||
import { zodResolver } from '@/hookform/resolvers/zod';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
const LoginSchema = z.object({
|
||||
email: z
|
||||
.email()
|
||||
, password: z
|
||||
.string()
|
||||
.min(8, "비밀번호는 8-12 자리여야 합니다.")
|
||||
.max(12, "비밀번호는 8-12 자리여야 합니다.")
|
||||
.regex(\^[a-z](?=.*[0-9])(?=.*[!@#$]).*$\)
|
||||
});
|
||||
Reference in New Issue
Block a user