Skip to content

Commit 515d049

Browse files
committed
feat: #399 form validation and error handling across all forms
- Add react-hook-form, zod, @hookform/resolvers dependencies - Create frontend/src/lib/validations.ts with Zod schemas for login, signup, and contact forms - Create frontend/src/component/FormField.tsx with reusable components: FormInput, FormTextarea, FormSelect, FormLabel, FieldError, FieldSuccess, SubmitButton, FormSuccessBanner, FormErrorBanner - Refactor login/page.tsx: inline validation, loading state, success/error banners - Refactor signin/page.tsx: inline validation, password strength meter, confirm password match, loading state, success/error banners - Refactor contact/page.tsx: replace manual validate() with Zod schema, use reusable form components throughout
1 parent 9dbdf64 commit 515d049

File tree

7 files changed

+987
-517
lines changed

7 files changed

+987
-517
lines changed

frontend/package-lock.json

Lines changed: 39 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@headlessui/react": "^2.2.4",
13+
"@hookform/resolvers": "^5.2.2",
1314
"@radix-ui/react-progress": "^1.1.7",
1415
"@radix-ui/react-slot": "^1.2.3",
1516
"@radix-ui/react-tabs": "^1.1.12",
@@ -22,9 +23,11 @@
2223
"next": "^16.1.6",
2324
"react": "^19.2.4",
2425
"react-dom": "^19.2.4",
26+
"react-hook-form": "^7.72.0",
2527
"react-icons": "^5.6.0",
2628
"tailwind-merge": "^3.3.0",
27-
"three": "^0.182.0"
29+
"three": "^0.182.0",
30+
"zod": "^4.3.6"
2831
},
2932
"devDependencies": {
3033
"@tailwindcss/postcss": "^4",

0 commit comments

Comments
 (0)