Refactor/loginform react hook form zod
refactored LoginForm.tsx to replace manual validation logic with react-hook-form and Zod. Removed all useState-based error handling and inline regex validations. Introduced a centralized validation schema in src/schemas/loginForm.ts using Zod and integrated it with react-hook-form using zodResolver. This makes the form cleaner, more maintainable, and fully type-safe while keeping the UI unchanged.
Type of Change:
-
Bug Fix -
Feature Development -
Documentation
Testing:
-
Tested on desktop -
Tested on mobile -
Tested in different browsers
Screenshots (if applicable):
Checklist:
-
Code follows project style guidelines -
Self-review completed -
No console errors -
TypeScript types are correct_
Edited by Swarna rathna madhuri Kanda



