From ed486141e6d1902a755ddbfbf87243d5cbf20536 Mon Sep 17 00:00:00 2001 From: Rachel Tai Ke Jia Date: Mon, 11 Nov 2024 19:38:24 +0800 Subject: [PATCH] Add enhancement to check for valid index --- docs/DeveloperGuide.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 977d9317c8c..280c0d0a12b 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1094,6 +1094,15 @@ Team size: 5 1. + +4. **Modify index parsing to check for valid indexes** +* **Flaw:** For `edit` commands utilising `INDEX` as a field, when users input an index larger than the + list size of `Person` or `Appointment`, the application does not check for the validity of the index. +* **Enhancement:** Implement a check to ensure that the index provided by the user is within the valid range + of the list size. If the index is invalid, display an error message to the user. +* **Sample Input:** `edit person 100000` +* **Expected Output:** The result display box shows `Invalid index! Please enter a valid index within the list size.` +
--------------------------------------------------------------------------------------------------------------------