Feature Validate AddBooking
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, react
调研方向
首先定位由 issue #24 引入的 AddBooking 表单,并运行应用以测试其 Submit 流程。为指定字段添加验证,同时保留已输入的文本;对于无效输入,在顶部显示红色错误,并确认有效值会按照测试中的描述显示在底部。
由索引模型根据 Issue 内容生成。
描述
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'?
- 主要语言
- JavaScript
- 星标
- 1
- 派生
- 28
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeYourFuture/React-Module-Project 的其他 Issue
-
♟️ Dependent ticket 🏕 Priority Mandatory 🐇 Size Small 📅 Week 3 📅 Week 4
难度 2/5 1-3 小时 新手友好度 65/100
-
🏕 Priority Mandatory 🐂 Size Medium 📅 Week 4 🧩 Feature
难度 2/5 1-3 小时 新手友好度 65/100
-
🐂 Size Medium 📅 Week 3 🧩 Feature
难度 2/5 1-3 小时 新手友好度 65/100
-
🏝️ Priority Stretch 🐂 Size Medium 📅 Week 2 🧩 Feature
难度 2/5 1-3 小时 新手友好度 65/100
-
🏕 Priority Mandatory 🐇 Size Small 📅 Week 2 🧩 Feature
难度 1/5 1 小时以内 新手友好度 68/100
查看 CodeYourFuture/React-Module-Project 的全部 Issue
相似的 Issue
-
bot:ai-assisted component:compact-js status:untriaged
难度 2/5 1-3 小时 新手友好度 84/100
midnightntwrk/midnight-sdk#403 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 1/5 1-3 小时 新手友好度 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
难度 2/5 1-3 小时 新手友好度 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
难度 2/5 1-3 小时 新手友好度 90/100