CodeYourFuture / CodeYourFuture/React-Module-Project

Feature Validate AddBooking

オープン
#26 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
🏝️ Priority Stretch 🐂 Size Medium 📅 Week 4 🧩 Feature
主要言語
JavaScript
スター
1
フォーク
28
PR マージ指標
30日以内にマージされた PR はありません

説明

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'?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。