Skip to content

Feat: Implement Client-Side Validation on Hotel Registration Form #18

@Git-brintsi20

Description

@Git-brintsi20

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.

Metadata

Metadata

Labels

gssoc 25Contributing for Updationlabel 1Contributing for Easy

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions