Skip to content

refactor: 메모 textfield 에 react-hook-form 및 Zod 유효성 검사 추가 #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

yeojini
Copy link
Contributor

@yeojini yeojini commented Oct 9, 2024

  • 메모 입력 필드에 react-hook-form 적용
  • Zod를 사용하여 메모 최대 2000자 유효성 검사 추가
  • 수정 및 등록 버튼 클릭 시 메모 업데이트 처리
  • 입력된 메모의 글자 수를 실시간으로 추적하고, 글자 수 카운터 표시
  • 유효성 검사 실패 시 버튼 비활성화, 글자 수 카운터 경고색 표시

Fixes #91

@yeojini yeojini requested a review from qaws7791 October 9, 2024 17:10
@yeojini yeojini force-pushed the fix/memo-validation branch from f6267fd to 055a825 Compare October 10, 2024 12:34
- 메모 입력 필드에 react-hook-form 적용
- Zod를 사용하여 메모 최대 2000자 유효성 검사 추가
- 수정 및 등록 버튼 클릭 시 메모 업데이트 처리
- 입력된 메모의 글자 수를 실시간으로 추적하고, 글자 수 카운터 표시
- 유효성 검사 실패 시 버튼 비활성화, 글자 수 카운터 경고색 표시

Fixes #91
- watch 사용시 두번째 매개변수로 '' 전달하여 메모 필드의 기본값 설정
- `UseFormRegister<{ title: string }>`에서 `UseFormRegister<PostSchema>`로 변경
- 기존의 title 속성을 PostSchema를 기반으로 확장
@yeojini yeojini force-pushed the fix/memo-validation branch from 055a825 to 0ebbf0d Compare October 10, 2024 13:00
@yeojini
Copy link
Contributor Author

yeojini commented Oct 11, 2024

@qaws7791 재확인 부탁드립니다!

@qaws7791
Copy link
Contributor

@yeojini 확인했습니다!

@yeojini yeojini merged commit 60337d1 into main Oct 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

메모 텍스트 필드 유효성 검증
2 participants