Birmingham | 26-ITP-May | Toluwalase Tiamiyu | Sprint 2 | Book-library - #511
Birmingham | 26-ITP-May | Toluwalase Tiamiyu | Sprint 2 | Book-library#511TTiamiyu wants to merge 5 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
3 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cjyuan
left a comment
There was a problem hiding this comment.
Can you check if any of this general feedback can help you further improve your code?
https://github.com/CodeYourFuture/Module-Data-Flows/blob/general-review-feedback/debugging/book-library/feedback.md
Doing so can help me speed up the review process. Thanks.
…s, fixed errors in HTML.
…alidation and status messages
hi, i have gone through the code and i have made the needed adjustment in my last commit, thank you |
cjyuan
left a comment
There was a problem hiding this comment.
Changes look great. Well done.
| <div class="form-group"> | ||
| <label for="pages">Pages:</label> | ||
| <input type="number" class="form-control" id="pages" min="1" required /> | ||
| </div> |
There was a problem hiding this comment.
Why not make this input element to accept only whole number?
| const pagesValue = Number(pagesInput.value); | ||
| const isRead = checkInput.checked; | ||
|
|
||
| // Validation check | ||
| if (!titleValue || !authorValue || isNaN(pagesValue) || pagesValue <= 0) { | ||
| showStatus("Please enter valid book details.", "danger"); | ||
| return; | ||
| } |
There was a problem hiding this comment.
What if pageValue is a number like 3.1416?
Learners, PR Template
Self checklist
Changelist
Book library Completed.