manishkumar8312 / manishkumar8312/QuickStay

Feat: Implement Client-Side Validation on Hotel Registration Form

Open
#18 4 comments 0 reactions 1 assignee Claimed by @Soumashree-Das View on GitHub
gssoc 25 label 1
Dominant language
JavaScript
Stars
20
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Hey @manishkumar8312

### Description
The `HotelReg` component currently uses basic HTML `required` attributes for validation. This provides a minimal and often inconsistent user experience. To improve usability and guide the user, we should implement robust, real-time client-side validation.

### Proposed Enhancements
- Add `onChange` handlers to the form inputs.
- Use component state to track not just the input values, but also any validation errors.
- Display clear, specific error messages directly below each field as the user types (e.g., "Please enter a valid phone number," "Hotel name cannot be empty.").
- The "Register" button should be disabled until the form is valid, preventing invalid submissions.

This task is purely a frontend component enhancement and can be worked on independently of the backend implementation for hotel registration, making it a non-conflicting issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.