nus-cs2113-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Invalid student id can still be added to the list #499

Open nus-pe-bot opened 2 weeks ago

nus-pe-bot commented 2 weeks ago

image.png

Input: add_student n/ben i/A1234567AA Expected output: Error! Matric Number should start with "A", followed by 7 digits, and end with an uppercase letter (e.g., A1234567X) Actual output: Student ben (A1234567AA) added successfully!

Similar bug can also be observed for the starting character

image.png

Users can have accidentally inputted an extra character at the end, so the program should be able to check for that extra character.


[original: nus-cs2113-AY2425S1/pe-interim#132] [original labels: severity.Medium type.FunctionalityBug]

RCPilot1604 commented 2 weeks ago

Team's Response

Thank you for your bug report. Indeed, this is an oversight on our end. It appears the regex anchors went missing during refactoring, resulting in substrings being matched rather than the entire string.

Thank you for pointing this out!

Duplicate status (if any):

--