CS2113-AY1819S1-T12-2 / HealthBook

Health Book - An address book app for health care professionals
https://cs2113-ay1819s1-t12-2.github.io/main/
MIT License
0 stars 5 forks source link

addhist says error is blank even when its not #156

Closed nus-pe-script closed 5 years ago

nus-pe-script commented 5 years ago

Describe the bug Add history does not work if there is a space after the hsa tag.

To Reproduce Steps to reproduce the behavior:

  1. enter "addhist 1 hsd/11-11-1991 hsa/i am sick hsc/place hsds/yes"
  2. doesnt work
  3. but "addhist 1 hsd/11-11-1991 hsa/iamsick hsc/place hsds/yes" does

Expected behavior Allergy should be added

Screenshots If applicable, add screenshots to help explain your problem. image

Additional context Add any other context about the problem here.


Reported by: @bearperson1 Severity: High

[original: nusCS2113-AY1819S1/pe-1#271]

xShaivan commented 5 years ago

Thank you for pointing out this bug. I can confirm it exists and it is due to my regex check restricting inputs to only contain alphanumeric characters. I have since changed the regex to allow whitespaces as well and it will be found in the v1.4 release.