Open nus-pe-bot opened 1 day ago
Thank you for the bug report. We appreciate your effort in identifying this issue and highlighting the mismatch in error messaging.
Issue Explanation:
deadline Have medicine /by 19:00 /by 12:00 /tag dsafsaf
fails because the /by
flag is duplicated. However, the error message displayed incorrectly points to the time format as the source of the error instead of highlighting the duplicate /by
flags./by
flags.Why This Happens:
/by
. As a result:
19:00 /by 12:00
is processed sequentially by the date-time validator./by
flag as part of the time value, resulting in an invalid time format.DateTime
validation correctly rejects the invalid input based on its rules, as 19:00 /by 12:00
is not a valid time format. While this behaviour is correct from the perspective of the DateTime
validator, the root cause of the issue (duplicate /by
flags) is not explicitly identified.Justification for NotInScope:
/by
) during the command parsing stage, before passing arguments to the DateTime
validator. This would require restructuring the sequence of validations and introducing additional checks to ensure correctness./tag
or other command-specific options).NotInScope
for the current version.Proposed Enhancement:
"Duplicate flag detected: /by. Please ensure each flag is used only once in the command."
Conclusion: While the app functions as documented and this issue does not impact its usability, we acknowledge that the error message could be improved to reduce user confusion. We appreciate your feedback and will consider this enhancement in future updates to further refine error reporting and the overall user experience.
Thank you again for bringing this to our attention.
--
If the user duplicates the argument
by
indeadline
command, the following error message show up:however, the error message said the time format was invalid while the user entered the correct formats. The error message should be about the duplicate arguments
[original: nus-cs2113-AY2425S1/pe-interim#549] [original labels: type.DocumentationBug severity.VeryLow]