krishnaacharyaa / wanderlust

WanderLust is a MERN travel blog website 🚀 This project is aimed to help people to contribute in open source, upskill in react and master git.
https://wanderlust-beta.vercel.app/
MIT License
174 stars 833 forks source link

fix-#77: Refactor Form Validation with react-hook-form & zod #344

Closed ShristiSharan closed 1 month ago

ShristiSharan commented 1 month ago

Summary

This PR address 1.Validation schema modification 2.Form validation logic enhancement

  1. 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:

image

and once corrected, error gets removed-

image

Issue(s) Addressed

Closes #77

Prerequisites

vercel[bot] commented 1 month ago

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

Name Status Preview Comments Updated (UTC)
wanderlust ❌ Failed (Inspect) May 26, 2024 6:17am
wanderlust-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 26, 2024 6:17am
github-actions[bot] commented 1 month ago

Umm... did someone forget to read the style guide? Fix that PR title and let's try again! @ShristiSharan Don't worry, it happens to the best of us! Check out our contributor guidelines for more details.

github-actions[bot] commented 1 month ago

Hey @ShristiSharan! Thanks for sticking to the guidelines! High five! 🙌🏻