Add inline validation for property form - #130
Open
Vivek5709 wants to merge 1 commit into
Open
Conversation
|
@Vivek5709 is attempting to deploy a commit to the Akshay Kumar's projects Team on Vercel. A member of the Team first needs to authorize it. |
akshay0611
approved these changes
Jul 13, 2026
akshay0611
left a comment
Owner
There was a problem hiding this comment.
Review: Add inline validation for property form
This adds step-by-step validation to the property creation wizard so users can't skip required fields. A clear, focused change.
What looks great ✨
- The
validateCurrentStep()function covers exactly the right fields — title, category, city, state, images, pricing, amenities. Thoughtful selection of what to validate at each step. - Nice touch: price of 0 or negative is blocked (
parseFloat() <= 0), not just empty. - Placing the validation call inside
goToNextStep()keeps the change minimal and non-invasive to the rest of the wizard. - Only one file changed — clean, focused PR.
Optional suggestions (feel free to ignore)
- The PR description mentions inline error messages and red borders on invalid fields, but the implementation uses
alert()dialogs. Consider upgrading to inline validation — it's a much smoother UX than browser alerts, and you already have the right logic for it.
Verdict
APPROVE — solid validation logic, no bugs, no regressions. Great work!
Owner
|
@Vivek5709 Mention the issues which it closes in format of Close #(Issue No) |
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
Implemented step-wise validation for the Property Creation Wizard to ensure users cannot proceed with incomplete required information.
Changes Made
validateCurrentStep()function to validate the current step before allowing navigation.goToNextStep()to callvalidateCurrentStep()before moving to the next step.errorsstate to manage validation errors for required fields.Validation Rules
Step 1 – Basic Info
Step 2 – Images
Step 3 – Pricing
Step 4 – Amenities
Step 5 – Review
Result