refactor: 모임 생성 폼을 zod 기반 validation으로 리팩토링#65
Conversation
모임 생성 폼의 validation을 zod 기반으로 관리하기 위한 스키마 정의 - peopleCount, scheduledDate, timeSlot, region 필드 정의 - 기존 validateDateInput 유틸 함수 재사용 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- useCreateMeetingForm에 zodResolver 적용 및 submit 로직 통합 - Step 컴포넌트에서 rules 객체 제거 - page.tsx에서 submit 로직 제거하여 간소화 - CreateMeetingForm 인터페이스를 스키마 타입으로 대체 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- DATE_ERROR_MESSAGES를 유틸로 추출하여 공유 - DateStep에서 fieldState.error 사용으로 변경 - DateStepFooter에서 formState.errors 기반으로 버튼 활성화 판단 - 스키마에서 10자리 미만일 때는 validation 건너뛰도록 수정 (이전 동작 유지) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of ChangesHello @youngminss, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 모임 생성 퍼널의 폼 유효성 검사 시스템을 Zod 기반으로 재구축하여 코드의 일관성과 유지보수성을 크게 향상시키는 것을 목표로 합니다. 기존에 각 컴포넌트에 분산되어 있던 유효성 검사 로직과 폼 제출 처리를 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| const scheduledDateSchema = z.string().check((ctx) => { | ||
| // 10자리(yyyy.MM.dd) 입력 완료 시에만 validation 수행 | ||
| // 빈 문자열이거나 입력 중일 때는 에러 표시하지 않음 | ||
| if (ctx.value.length < 10) { | ||
| return; | ||
| } | ||
|
|
||
| const error = validateDateInput(ctx.value); | ||
| if (error) { | ||
| ctx.issues.push({ | ||
| code: "custom", | ||
| message: DATE_ERROR_MESSAGES[error], | ||
| input: ctx.value, | ||
| path: [], | ||
| }); | ||
| } | ||
| }); |
There was a problem hiding this comment.
Zod의 .check() 메서드는 현재 deprecated 상태이며 Zod v4에서 제거될 예정입니다. 대신 .refine()을 사용해야 합니다. 현재 구현은 check의 콜백 함수에서 boolean 값을 반환하지 않고 있어 예기치 않은 동작을 유발할 수 있습니다. .refine()으로 변경하여 유효성 검사 로직을 명확하고 안전하게 수정하는 것을 권장합니다.
| const scheduledDateSchema = z.string().check((ctx) => { | |
| // 10자리(yyyy.MM.dd) 입력 완료 시에만 validation 수행 | |
| // 빈 문자열이거나 입력 중일 때는 에러 표시하지 않음 | |
| if (ctx.value.length < 10) { | |
| return; | |
| } | |
| const error = validateDateInput(ctx.value); | |
| if (error) { | |
| ctx.issues.push({ | |
| code: "custom", | |
| message: DATE_ERROR_MESSAGES[error], | |
| input: ctx.value, | |
| path: [], | |
| }); | |
| } | |
| }); | |
| const scheduledDateSchema = z.string().refine((value, ctx) => { | |
| // 10자리(yyyy.MM.dd) 입력 완료 시에만 validation 수행 | |
| // 빈 문자열이거나 입력 중일 때는 에러 표시하지 않음 | |
| if (value.length < 10) { | |
| return true; | |
| } | |
| const error = validateDateInput(value); | |
| if (error) { | |
| ctx.addIssue({ | |
| code: "custom", | |
| message: DATE_ERROR_MESSAGES[error], | |
| }); | |
| return false; | |
| } | |
| return true; | |
| }); |
References
- Zod의
.check()메서드는 deprecated 상태이며,.refine()사용이 권장됩니다. 현재 코드는 deprecated된 API를 사용하고 있으며, 콜백 함수의 반환 값이 없어 버그의 소지가 있습니다. (link)
| const handleSubmit = methods.handleSubmit((data) => { | ||
| if ( | ||
| !data.peopleCount || | ||
| !data.timeSlot || | ||
| !data.scheduledDate || | ||
| !data.region | ||
| ) { | ||
| return; | ||
| } | ||
|
|
||
| createGathering( | ||
| { | ||
| peopleCount: data.peopleCount, | ||
| region: data.region, | ||
| scheduledDate: data.scheduledDate.replace(/\./g, "-"), | ||
| timeSlot: data.timeSlot, | ||
| }, | ||
| { | ||
| onSuccess: (response) => { | ||
| router.push( | ||
| `/gathering/create/complete/${response.data.accessKey}`, | ||
| ); | ||
| }, | ||
| onError: (error) => { | ||
| if (isApiError(error)) { | ||
| toast.warning(error.message); | ||
| } | ||
| }, | ||
| }, | ||
| ); | ||
| }); |
There was a problem hiding this comment.
handleSubmit 콜백 내에서 수동으로 필드의 존재 여부를 확인하는 대신, 제출 전용의 더 엄격한 Zod 스키마를 정의하여 데이터 유효성을 검증하는 것이 좋습니다. 이 접근 방식은 유효성 검사 로직을 Zod 스키마로 중앙화하여 코드의 일관성과 예측 가능성을 높입니다. 현재 if 문은 타입 가드 역할을 하지만, safeParse와 함께 별도의 제출 스키마를 사용하면 이 로직을 더 선언적으로 만들 수 있습니다.
const handleSubmit = methods.handleSubmit((data) => {
const submissionSchema = createMeetingFormSchema.required({
peopleCount: true,
timeSlot: true,
region: true,
}).refine((d) => d.scheduledDate.length > 0, {
path: ["scheduledDate"],
message: "날짜를 입력해주세요.",
});
const result = submissionSchema.safeParse(data);
if (!result.success) {
// 일반적으로 UI의 버튼 비활성화로 인해 호출되지 않지만, 안전장치로 남겨둡니다.
return;
}
const { peopleCount, region, scheduledDate, timeSlot } = result.data;
createGathering(
{
peopleCount,
region,
scheduledDate: scheduledDate.replace(/\./g, "-"),
timeSlot,
},
{
onSuccess: (response) => {
router.push(
`/gathering/create/complete/${response.data.accessKey}`,
);
},
onError: (error) => {
if (isApiError(error)) {
toast.warning(error.message);
}
},
},
);
});878c203
into
fix/gathering-create-form-field-state
* fix: CreateMeetingForm 타입을 optional 에서 nullable 로 변경 react-hook-form의 field.onChange(undefined) 호출 시 이전 값으로 롤백되는 문제를 해결하기 위해 undefined 대신 null을 사용하도록 타입을 변경하고 defaultValues를 설정 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: 모임 생성 퍼널 Step 컴포넌트 toggle 버그 수정 - undefined 대신 null을 사용하여 필드 초기화가 정상 동작하도록 수정 - Footer 컴포넌트에서 useController 대신 useWatch 사용 - RegionChip에 toggle 로직 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: 모임 생성 폼을 zod 기반 validation으로 리팩토링 (#65) * feat: CreateMeetingForm zod 스키마 추가 모임 생성 폼의 validation을 zod 기반으로 관리하기 위한 스키마 정의 - peopleCount, scheduledDate, timeSlot, region 필드 정의 - 기존 validateDateInput 유틸 함수 재사용 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: 모임 생성 폼을 zod 기반 validation으로 리팩토링 - useCreateMeetingForm에 zodResolver 적용 및 submit 로직 통합 - Step 컴포넌트에서 rules 객체 제거 - page.tsx에서 submit 로직 제거하여 간소화 - CreateMeetingForm 인터페이스를 스키마 타입으로 대체 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: DATE_ERROR_MESSAGES 중복 제거 및 formState 활용 - DATE_ERROR_MESSAGES를 유틸로 추출하여 공유 - DateStep에서 fieldState.error 사용으로 변경 - DateStepFooter에서 formState.errors 기반으로 버튼 활성화 판단 - 스키마에서 10자리 미만일 때는 validation 건너뛰도록 수정 (이전 동작 유지) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * style: useCreateMeetingForm 조건문 포맷팅 정리 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * refactor: useWatch 사용 패턴 개선 - DateStep: 두 개의 useWatch를 배열 형태로 축약 - PeopleStep: useWatch + compute 조합으로 isValid 계산 - RegionStep: useWatch + compute 조합으로 isValid 계산 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: DateStep isValid 검증 로직 개선 - isValidDateFormat을 사용하여 날짜 포맷 검증 복구 - useWatch + compute 조합으로 isValid 계산 통합 - formState.errors 의존성 제거 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: CreateMeetingForm 타입을 optional 에서 nullable 로 변경 react-hook-form의 field.onChange(undefined) 호출 시 이전 값으로 롤백되는 문제를 해결하기 위해 undefined 대신 null을 사용하도록 타입을 변경하고 defaultValues를 설정 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: 모임 생성 퍼널 Step 컴포넌트 toggle 버그 수정 - undefined 대신 null을 사용하여 필드 초기화가 정상 동작하도록 수정 - Footer 컴포넌트에서 useController 대신 useWatch 사용 - RegionChip에 toggle 로직 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: 모임 생성 폼을 zod 기반 validation으로 리팩토링 (#65) * feat: CreateMeetingForm zod 스키마 추가 모임 생성 폼의 validation을 zod 기반으로 관리하기 위한 스키마 정의 - peopleCount, scheduledDate, timeSlot, region 필드 정의 - 기존 validateDateInput 유틸 함수 재사용 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: 모임 생성 폼을 zod 기반 validation으로 리팩토링 - useCreateMeetingForm에 zodResolver 적용 및 submit 로직 통합 - Step 컴포넌트에서 rules 객체 제거 - page.tsx에서 submit 로직 제거하여 간소화 - CreateMeetingForm 인터페이스를 스키마 타입으로 대체 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: DATE_ERROR_MESSAGES 중복 제거 및 formState 활용 - DATE_ERROR_MESSAGES를 유틸로 추출하여 공유 - DateStep에서 fieldState.error 사용으로 변경 - DateStepFooter에서 formState.errors 기반으로 버튼 활성화 판단 - 스키마에서 10자리 미만일 때는 validation 건너뛰도록 수정 (이전 동작 유지) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * style: useCreateMeetingForm 조건문 포맷팅 정리 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * refactor: useWatch 사용 패턴 개선 - DateStep: 두 개의 useWatch를 배열 형태로 축약 - PeopleStep: useWatch + compute 조합으로 isValid 계산 - RegionStep: useWatch + compute 조합으로 isValid 계산 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: DateStep isValid 검증 로직 개선 - isValidDateFormat을 사용하여 날짜 포맷 검증 복구 - useWatch + compute 조합으로 isValid 계산 통합 - formState.errors 의존성 제거 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
## 1.0.0-beta.1 (2026-02-16) ### Features * [#70](#70) ([#72](#72)) ([b676e0e](b676e0e)) * [QA] 모임 생성 완료, 결과페이지 페이지 UI 개선 ([#66](#66)) ([f10225d](f10225d)) * [QA] 서비스 전체 배경색 및 Layout Root 그림자 효과 적용 ([#59](#59)) ([384b56f](384b56f)) * api client 모듈 생성 ([#37](#37)) ([a37b0a9](a37b0a9)), closes [#38](#38) [#39](#39) [#40](#40) [#41](#41) * Button 컴포넌트 추가 ([#11](#11)) ([83b7607](83b7607)) * Chip Component 추가 ([#9](#9)) ([e9d8b8f](e9d8b8f)) * Color theme 초기화 ([#2](#2)) ([97f1dcc](97f1dcc)) * DotsLoader 컴포넌트 추가 ([#48](#48)) ([cfe4582](cfe4582)), closes [#49](#49) * GA4 이벤트 트래킹 통합 ([#70](#70)) ([0c1b9fa](0c1b9fa)) * GTM(Google Tag Manager) 통합을 위한 Analytics 컴포넌트 추가 ([#57](#57)) ([87a6ded](87a6ded)) * IconBase 컴포넌트 및 아이콘 컴포넌트들 구축 ([#13](#13)) ([8557b75](8557b75)), closes [#FFCD00](https://github.com/Nexters/yogieat/issues/FFCD00) [#FFAD00](https://github.com/Nexters/yogieat/issues/FFAD00) [#15](#15) [#ff5a3c](https://github.com/Nexters/yogieat/issues/ff5a3c) * InputField 컴포넌트 추가 ([#16](#16)) ([99b8aa2](99b8aa2)) * Landing / Opinion Form 페이지 분리 ([#61](#61)) ([0f11e71](0f11e71)) * Layout 컴포넌트 추가 ([#10](#10)) ([9efce6f](9efce6f)) * Semantic Color Token 추가 ([#19](#19)) ([fcaedaf](fcaedaf)) * Spacing utility 클래스 초기화 ([#8](#8)) ([2e38d7a](2e38d7a)) * Tag 컴포넌트 추가 ([#20](#20)) ([f69dd05](f69dd05)) * Toast 컴포넌트 추가 ([#21](#21)) ([76e84b0](76e84b0)) * 모임 생성 퍼널 Step 1 (인원 선택) 구현 ([#23](#23)) ([7fc01a1](7fc01a1)), closes [#24](#24) [#1f2933](https://github.com/Nexters/yogieat/issues/1f2933) [#ff5a3c](https://github.com/Nexters/yogieat/issues/ff5a3c) [#25](#25) [#26](#26) [#27](#27) [#28](#28) [#29](#29) [#30](#30) [#31](#31) [#32](#32) [#34](#34) * 프로젝트 기초 세팅 진행 ([aa0ec20](aa0ec20)) * 프로젝트 폴더 구조 반영 ([e54962d](e54962d)) ### Bug Fixes * 1순위를 1개라도 선택했다면 바로 CTA 가 활성화 되도록 수정 ([#60](#60)) ([e5758b4](e5758b4)) * 1차 MVP 배포 이전 최종 QA 항목 반영 ([#58](#58)) ([6574231](6574231)) * Button/Chip type 속성 추가 및 의견 수렴 UX 개선 ([#50](#50)) ([7e86e4a](7e86e4a)), closes [#51](#51) [#52](#52) [#53](#53) [#54](#54) [#55](#55) [#56](#56) * cat 에서 echo 로 env.production 파일을 생성하도록 수정 ([f15307d](f15307d)) * CI/CD health check 타이밍 개선 및 수동 배포 기능 추가 ([54fd2b8](54fd2b8)) * Docker build-args로 환경 변수 전달 방식 변경 ([#77](#77)) ([e5fa0b9](e5fa0b9)) * Docker 이미지 강제 pull 및 컨테이너 재생성 ([#79](#79)) ([c253ec1](c253ec1)) * Health check 전략 개선 및 curl 기반으로 변경 ([765d3da](765d3da)) * nginx http2 deprecated 경고 해결 ([2fd9c75](2fd9c75)) * PendingView 내에서 ShareButton 을 렌더링 하지 않도록 수정 ([7bc3e12](7bc3e12)) * 결과 페이지 맛집 이미지 기본 placeholder, 공유하기 toast 미노출 ([#68](#68)) ([3c80844](3c80844)) * 동시 배포 방지를 위한 concurrency 설정 추가 ([e9bfd52](e9bfd52)) * 모임 생성 퍼널 필드 상태 초기화 버그 수정 ([#64](#64)) ([3934066](3934066)), closes [#65](#65) * 모임 생성 폼 필드명 변경 (meetingDate → scheduledDate, location → region) ([#35](#35)) ([e90beed](e90beed)) * 배포 워크플로우에 GA4 환경 변수 추가 ([#73](#73)) ([835ae1f](835ae1f)) * 의견 수렴 페이지 내 UI 수정 및 인터렉션 개선 ([#36](#36)) ([a74f7da](a74f7da)) * 의견 수합 Form Capacity 폴링 제거 및 ErrorCode 타입 시스템 추가 ([#67](#67)) ([d55dba1](d55dba1)) * 인원 수 선택 Grid 및 의견 수렴 QA 수정 사항 반영 ([f01626e](f01626e)) * 테스트 용으로 추가했던 페이지 제거 및 icons 폴더 추가 ([4116025](4116025)) ### Code Refactoring * Button 컴포넌트 스펙을 Figma 명세에 맞춰 수정 ([#14](#14)) ([2e27f17](2e27f17)) ### Build System * Docker 빌드 시 NEXT_PUBLIC 환경변수 주입 프로세스 추가 ([#47](#47)) ([88ba163](88ba163)) ### Documentation * 프로젝트 개발 가이드 문서 추가 ([#84](#84)) ([4313145](4313145))
## 1.0.0 (2026-02-16) ### Features * [#70](#70) ([#72](#72)) ([b676e0e](b676e0e)) * [QA] 모임 생성 완료, 결과페이지 페이지 UI 개선 ([#66](#66)) ([f10225d](f10225d)) * [QA] 서비스 전체 배경색 및 Layout Root 그림자 효과 적용 ([#59](#59)) ([384b56f](384b56f)) * analytics 개선 및 네이버 서치 어드바이저 등록 ([#88](#88)) ([4372aa5](4372aa5)) * api client 모듈 생성 ([#37](#37)) ([a37b0a9](a37b0a9)), closes [#38](#38) [#39](#39) [#40](#40) [#41](#41) * Button 컴포넌트 추가 ([#11](#11)) ([83b7607](83b7607)) * Chip Component 추가 ([#9](#9)) ([e9d8b8f](e9d8b8f)) * Color theme 초기화 ([#2](#2)) ([97f1dcc](97f1dcc)) * DotsLoader 컴포넌트 추가 ([#48](#48)) ([cfe4582](cfe4582)), closes [#49](#49) * GA4 이벤트 트래킹 통합 ([#70](#70)) ([0c1b9fa](0c1b9fa)) * GTM(Google Tag Manager) 통합을 위한 Analytics 컴포넌트 추가 ([#57](#57)) ([87a6ded](87a6ded)) * IconBase 컴포넌트 및 아이콘 컴포넌트들 구축 ([#13](#13)) ([8557b75](8557b75)), closes [#FFCD00](https://github.com/Nexters/yogieat/issues/FFCD00) [#FFAD00](https://github.com/Nexters/yogieat/issues/FFAD00) [#15](#15) [#ff5a3c](https://github.com/Nexters/yogieat/issues/ff5a3c) * InputField 컴포넌트 추가 ([#16](#16)) ([99b8aa2](99b8aa2)) * Landing / Opinion Form 페이지 분리 ([#61](#61)) ([0f11e71](0f11e71)) * Layout 컴포넌트 추가 ([#10](#10)) ([9efce6f](9efce6f)) * Semantic Color Token 추가 ([#19](#19)) ([fcaedaf](fcaedaf)) * Spacing utility 클래스 초기화 ([#8](#8)) ([2e38d7a](2e38d7a)) * Tag 컴포넌트 추가 ([#20](#20)) ([f69dd05](f69dd05)) * Toast 컴포넌트 추가 ([#21](#21)) ([76e84b0](76e84b0)) * 모임 생성 완료 페이지 UI 리뉴얼 ([#89](#89)) ([17a3fc1](17a3fc1)) * 모임 생성 퍼널 Step 1 (인원 선택) 구현 ([#23](#23)) ([7fc01a1](7fc01a1)), closes [#24](#24) [#1f2933](https://github.com/Nexters/yogieat/issues/1f2933) [#ff5a3c](https://github.com/Nexters/yogieat/issues/ff5a3c) [#25](#25) [#26](#26) [#27](#27) [#28](#28) [#29](#29) [#30](#30) [#31](#31) [#32](#32) [#34](#34) * 프로젝트 기초 세팅 진행 ([aa0ec20](aa0ec20)) * 프로젝트 폴더 구조 반영 ([e54962d](e54962d)) ### Bug Fixes * 1순위를 1개라도 선택했다면 바로 CTA 가 활성화 되도록 수정 ([#60](#60)) ([e5758b4](e5758b4)) * 1차 MVP 배포 이전 최종 QA 항목 반영 ([#58](#58)) ([6574231](6574231)) * Button/Chip type 속성 추가 및 의견 수렴 UX 개선 ([#50](#50)) ([7e86e4a](7e86e4a)), closes [#51](#51) [#52](#52) [#53](#53) [#54](#54) [#55](#55) [#56](#56) * cat 에서 echo 로 env.production 파일을 생성하도록 수정 ([f15307d](f15307d)) * CI/CD health check 타이밍 개선 및 수동 배포 기능 추가 ([54fd2b8](54fd2b8)) * Docker build-args로 환경 변수 전달 방식 변경 ([#77](#77)) ([e5fa0b9](e5fa0b9)) * Docker 이미지 강제 pull 및 컨테이너 재생성 ([#79](#79)) ([c253ec1](c253ec1)) * Health check 전략 개선 및 curl 기반으로 변경 ([765d3da](765d3da)) * nginx http2 deprecated 경고 해결 ([2fd9c75](2fd9c75)) * PendingView 내에서 ShareButton 을 렌더링 하지 않도록 수정 ([7bc3e12](7bc3e12)) * 결과 페이지 맛집 이미지 기본 placeholder, 공유하기 toast 미노출 ([#68](#68)) ([3c80844](3c80844)) * 동시 배포 방지를 위한 concurrency 설정 추가 ([e9bfd52](e9bfd52)) * 모임 생성 퍼널 필드 상태 초기화 버그 수정 ([#64](#64)) ([3934066](3934066)), closes [#65](#65) * 모임 생성 폼 필드명 변경 (meetingDate → scheduledDate, location → region) ([#35](#35)) ([e90beed](e90beed)) * 배포 워크플로우에 GA4 환경 변수 추가 ([#73](#73)) ([835ae1f](835ae1f)) * 의견 수렴 페이지 내 UI 수정 및 인터렉션 개선 ([#36](#36)) ([a74f7da](a74f7da)) * 의견 수합 Form Capacity 폴링 제거 및 ErrorCode 타입 시스템 추가 ([#67](#67)) ([d55dba1](d55dba1)) * 인원 수 선택 Grid 및 의견 수렴 QA 수정 사항 반영 ([f01626e](f01626e)) * 테스트 용으로 추가했던 페이지 제거 및 icons 폴더 추가 ([4116025](4116025)) ### Code Refactoring * Button 컴포넌트 스펙을 Figma 명세에 맞춰 수정 ([#14](#14)) ([2e27f17](2e27f17)) ### Build System * Docker 빌드 시 NEXT_PUBLIC 환경변수 주입 프로세스 추가 ([#47](#47)) ([88ba163](88ba163)) ### Documentation * 프로젝트 개발 가이드 문서 추가 ([#84](#84)) ([4313145](4313145))
🎯 refactor: 모임 생성 폼을 zod 기반 validation으로 리팩토링
모임 생성 퍼널의 form validation을 zod 스키마 기반으로 변경하여 일관된 validation 관리를 적용합니다.
📑 작업 상세 내역
createMeetingForm.schema.ts생성하여 zod 스키마 정의useCreateMeetingForm훅에 zodResolver 적용 및 submit 로직 통합page.tsx에서 submit 로직 제거하여 간소화DATE_ERROR_MESSAGES를 유틸로 추출하여 중복 제거DateStep에서formState.errors기반으로 에러 표시 및 버튼 활성화 판단🙏 리뷰 요청 사항
useOpinionForm과 동일한 패턴으로 구현했습니다.📃 참고 자료
fix/gathering-create-form-field-state(toggle 버그 수정)🖼️ 작업 결과물