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

Feature Validate AddBooking #24

Closed
RbAvci opened this issue Feb 24, 2024 · 0 comments · Fixed by #63
Closed

Feature Validate AddBooking #24

RbAvci opened this issue Feb 24, 2024 · 0 comments · Fixed by #63

Comments

@RbAvci
Copy link
Owner

RbAvci commented Feb 24, 2024

From React-Module-Project created by SallyMcGrath: CodeYourFuture#26

Depends on #24

Instructions:

Add validation to some fields from #24 : the first name and last name must not be empty, the email must contain exactly 1 @ symbol, and at least one . symbol after the @; the room ID must be a number between 0 and 100. If the fields do not contain correct information when the 'Submit' button is pressed, display a red error message at the top of the page, but do not clear the text already in the field.

Test:

An invalid input displays an error message after the 'Submit' button is pressed (e.g. an email like react@com is invalid). A valid input shows the correct values at the bottom of the page.

Reflection:

Validating user input is an important part of any application. Without checking the input, you might see unexpected errors when working with the data later.

What do you think would happen if you were asked to remove a booking for room number '81', but the user had typed 'eightyOne' or 'EIGHTY ONE'?

@RbAvci RbAvci moved this to 📋 Backlog in React Module Project Mar 15, 2024
@fikretellek fikretellek moved this from 📋 Backlog to 🔖 Ready in React Module Project Mar 25, 2024
@fikretellek fikretellek self-assigned this Mar 27, 2024
@fikretellek fikretellek moved this from 🔖 Ready to 🏗 In progress in React Module Project Mar 27, 2024
@fikretellek fikretellek moved this from 🏗 In progress to 👀 In review in React Module Project Mar 27, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in React Module Project Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants