nus-cs2103-AY2324S2 / pe-dev-response

0 stars 0 forks source link

add command: not suitable error message #4672

Open nus-se-script opened 4 months ago

nus-se-script commented 4 months ago

image.png

When given the year 20000 as the dob, it gives the "Date of birth takes in a date of format dd/MM/yyyy" error message. However, it may be nice if the date is future proof. Moreover, a more appropriate error message may be that the given dob is not before the admission date as stated in the UG. image.png


[original: nus-cs2103-AY2324S2/pe-interim#4059] [original labels: type.FunctionalityBug severity.Low]

ryanlimdx commented 4 months ago

Team's Response

The error detection is two-fold. Firstly, it detects if the user input is valid. Since the user input is invalid, it immediately throws this error. If the user input is valid for the respective date parameters BUT date of birth is after the admission date, it will then proceed to show the error, "Date of birth should not be later than date of admission."

The limits of the parameters are included in the parameters summary at the top of the features section, to avoid repetition. There is also a link to the parameters table at each command that requires parameters. Here is a screenshot of the relevant parameter(s):

image.png

Duplicate status (if any):

--