Feat/437 zod form validation expert registration - #451
Merged
Luluameh merged 7 commits intoAug 21, 2026
Merged
Conversation
… with per-second streaming knowledge marketplace
…dal; fix favicon build location
…efully, and sync wallet session across pages
…Storage parse crashes
…out external dependencies
…or for expert registration (LightForgeHub#437)
|
@Luluameh is attempting to deploy a commit to the luluameh's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #437
This PR introduces robust schema-based form validation for the Expert Registration flow using Zod and React Hook Form (
@hookform/resolvers/zod). It ensures all expert profiles meet strict data integrity requirements before on-chain registration or database ingestion, while providing live feedback and rate calculation tools for onboarding experts.Key Changes
1. Enhanced Zod Validation Schema (
src/utils/validation.ts)0.0001and10.0XLM/s.http://orhttps://) and domain verification for GitHub URLs.calculateMinuteRate(),calculateHourlyRate(), andparseTags()for UI conversions.2. Interactive Registration Form Component (
src/components/profile/RegistrationForm.tsx)react-hook-forminonChangemode for real-time validation feedback.XLM/min) and per-hour (XLM/hr) estimates.3. Dedicated Route & Unit Testing
src/app/register-expert/page.tsx): Full expert registration page with responsive hero and platform benefit pillars.tests/validation.spec.ts): 8 comprehensive unit test cases covering valid full/minimal payloads, edge cases, negative rates, URL validation, and rate converters."test:validation": "npx tsx tests/validation.spec.ts"topackage.json.Test Plan & Verification
Automated Tests
Run the validation test suite: