Skip to content

Feat/form validation feedback - #305

Open
Devadakene wants to merge 5 commits into
Epta-Node:mainfrom
Devadakene:feat/form-validation-feedback
Open

Feat/form validation feedback#305
Devadakene wants to merge 5 commits into
Epta-Node:mainfrom
Devadakene:feat/form-validation-feedback

Conversation

@Devadakene

Copy link
Copy Markdown

Closes #231

Summary

Enhances the TaskSubmissionForm and SendXLMForm with real-time inline validation, visual error states, success indicators, and accessible error announcements to reduce failed submissions and improve user confidence.

Changes

  • Extracted validation logic into shared Zod schemas in frontend/src/schemas/task.ts and frontend/src/schemas/wallet.ts.
  • Created a new reusable FormField component (frontend/src/components/common/FormField.tsx) with dynamic validation display (red/green borders on blur).
  • Refactored TaskSubmissionForm and SendXLMForm to integrate react-hook-form error handling with mode: 'onBlur'.
  • Disabled form submit buttons until all fields successfully pass validation.
  • Added aria-live="polite" regions for screen readers to dynamically announce validation errors.
  • Added a dynamic character counter (remaining/max) for the task prompt field.
  • Implemented success feedback mechanisms (button state changes + success toasts) on form submission.
  • Added test coverage for the new validation display logic (FormField.test.tsx).

Testing

  • Validation on Blur: Tab through empty or incorrectly formatted fields to verify that error messages (with AlertCircle icons) and red borders appear immediately on blur.
  • Valid States: Enter valid data and verify that fields receive a green border on blur.
  • Form Submission: Verify that the Submit button remains disabled until all inputs are valid.
  • Success Feedback: Submit a valid task and payment to verify the success toast and distinct button state changes appear.

Related Issue

  • #[Issue Number]

Checklist

  • Tests pass
  • Lint is clean
  • Documentation updated if needed

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

@Devadakene is attempting to deploy a commit to the Jaja's projects Team on Vercel.

A member of the Team first needs to authorize it.

@devJaja
devJaja self-requested a review August 22, 2026 04:36
@devJaja devJaja closed this Aug 22, 2026
@devJaja devJaja reopened this Aug 22, 2026
@devJaja

devJaja commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

@Devadakene
Resolve the conflicts, also fix the CI checks

@devJaja

devJaja commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@Devadakene
The CI frontend is still failing

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.

feat(ui): Add Form Validation Feedback with Inline Error Messages and Success Indicators

2 participants