Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix-#77: Refactor Form Validation with react-hook-form #294

Closed
wants to merge 1 commit into from
Closed

fix-#77: Refactor Form Validation with react-hook-form #294

wants to merge 1 commit into from

Conversation

ShristiSharan
Copy link

Summary

This PR address
1.Validation schema modification
2.Form validation logic enhancement
3. Image selection Improvements

Description

Added react hook form and zod which helps in validating the input fields and to show the error as user fills the required input field rather than showing error after complete submission.
The validation schema has been updated to include checks for the author's name length and the maximum number of selected categories, image selection, blog title length and description of blog to be posted.

Users now have the option to select an image for their blog post either by providing a URL or uploading a file from their device. Additionally, feedback is provided to the user upon image selection.

Images

Helping user to fill the input as per requirement beforehand:

val error

and once corrected, error gets removed-

VAL ERROR REES

Issue(s) Addressed

Closes #77

Prerequisites

Copy link

vercel bot commented May 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wanderlust ❌ Failed (Inspect) May 19, 2024 11:12am
wanderlust-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2024 11:12am

@ShristiSharan ShristiSharan changed the title fix-#77: Refactor Form Validation with react-hook-form and zod fix-#77: Refactor Form Validation with react-hook-form May 19, 2024
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.

Refactor Form vailidation using the react-hook-form and zod
1 participant