Skip to content

Fix/form standardization#158

Merged
RUKAYAT-CODER merged 7 commits into
rinafcode:mainfrom
Agbasimere:fix/form-standardization
Apr 25, 2026
Merged

Fix/form standardization#158
RUKAYAT-CODER merged 7 commits into
rinafcode:mainfrom
Agbasimere:fix/form-standardization

Conversation

@Agbasimere
Copy link
Copy Markdown
Contributor

@Agbasimere Agbasimere commented Apr 23, 2026

Close #120

Overview

This PR standardizes the form validation approach across the application by moving away from custom state-based validation to a unified react-hook-form and Zod implementation. It also introduces a reusable FormInput component to ensure visual and functional consistency.

Changes

  • Standardized Form Component: Created src/components/forms/FormInput.tsx which integrates with react-hook-form and provides consistent styling, icons, and error messaging for inputs, textareas, and selects.
  • Profile Form Refactor: Updated ProfileEditForm.tsx to use the new FormInput component, simplifying the markup and standardizing error handling.
  • Course Creation Wizard Refactor:
    • Implemented a comprehensive courseSchema using Zod for step-by-step validation.
    • Integrated react-hook-form into the multi-step wizard.
    • Replaced manual input handlers with the standardized FormInput component.
    • Added validation triggers before proceeding to subsequent steps.

Impacted Files

  • src/components/forms/FormInput.tsx (New)
  • src/components/profile/ProfileEditForm.tsx
  • src/components/instructor/CourseCreationWizard.tsx

Acceptance Criteria

  • Forms standardized on react-hook-form and Zod.
  • Reusable FormInput component implemented and used.
  • Consistent error messaging and validation UX across updated forms.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 23, 2026

@Agbasimere Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

KINDLY RESOLVE CONFLICT AND FIX CI

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Kindly resolve conflict and fix CI

This reverts commit 2f54bb1, reversing
changes made to 9d2458d.
…ation

# Conflicts:
#	package.json
#	scripts/validate-ui.cjs
#	src/app/hooks/useSearchFilters.ts
#	src/components/errors/ErrorBoundarySystem.tsx
#	src/components/instructor/CourseCreationWizard.tsx
#	src/form-management/validation/validation-system-example.ts
#	src/hooks/useSearchFilters.tsx
#	src/utils/web3/envValidation.ts
@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Resolve conflict

@RUKAYAT-CODER RUKAYAT-CODER merged commit 74e35d5 into rinafcode:main Apr 25, 2026
3 of 4 checks passed
RUKAYAT-CODER pushed a commit that referenced this pull request Apr 28, 2026
Fixes #270" closes #77 Fixes #158
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.

Form Validation Standardization

2 participants