Skip to content

Improve form validation and accessibility#258

Open
kumudasrip wants to merge 1 commit into
rdodiya:gssoc_developfrom
kumudasrip:fix/input-validation
Open

Improve form validation and accessibility#258
kumudasrip wants to merge 1 commit into
rdodiya:gssoc_developfrom
kumudasrip:fix/input-validation

Conversation

@kumudasrip

Copy link
Copy Markdown

Closes #41

  • Summary: Add consistent client-side validation, accessible per-field error messages, ARIA attributes, and visual error highlights for public and admin/profile forms. This improves UX, prevents invalid submissions client-side, and keeps server-side flows unchanged.
  • Changes:
    • Validation & Accessibility: Added fieldErrors/errors handling, aria-invalid/aria-describedby, and inline error elements.
    • Relaxed Login rule: softened overly-strict password regex to a minimum-length rule to avoid blocking existing users.
  • Files touched:
    • src/components/customer/ReservationsSection.jsx
    • src/pages/public/Login.jsx
    • src/components/admin/upi/UPIFormModal.jsx
    • src/components/admin/menu/menuCard/CategoryFormModal.jsx
    • src/components/admin/menu/menuCard/FoodItemFormModal.jsx
    • src/components/admin/store/tables/TableFormModal.jsx
    • src/components/admin/store/branch/BranchFormModal.jsx
    • src/components/admin/profile/profileComponents/PersonalInfoCard.jsx
    • src/components/admin/profile/profileComponents/SecurityCard.jsx
  • Testing:
    • Ran development server and exercised these forms to verify: inline errors appear, inputs get visual red border when invalid, ARIA attributes link to error text, and valid submissions still call the same API endpoints.
    • Quick commands:
npm install
npm run dev
# Open app and test Reservatons, Login, UPI, Category, Menu Item, Branch, Table, and Profile forms

@kumudasrip

Copy link
Copy Markdown
Author

Hello @rdodiya
I have merged this PR for the issue #41 under GSSoC 2026
Please do review and merge the PR whenever possible, thank you!

@kumudasrip

Copy link
Copy Markdown
Author

Hello @rdodiya ,

Just following up on this PR. Since it affects several commonly used form components and there are currently no merge conflicts, an early review/merge would be very helpful. It would make the validation and accessibility improvements available for future contributions and help avoid potential conflicts as development continues.

Thank you for your time and consideration. Looking forward to your review!

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.

Improve Input Validation and User-Friendly Error Messages on All Forms

1 participant