Closed Vortex-21 closed 1 month ago
I have added the necessary validation procedure for the above issue.
Hey @Vortex-21, thanks for taking the time to contribute, we really appreciate it! This looks good, would you be able to add a test to validate that the code is working as expected? Also please make sure to post on the issue thread to let us know you're working on it so we can avoid any duplication of work.
Hey @Vortex-21, thanks for taking the time to contribute, we really appreciate it! This looks good, would you be able to add a test to validate that the code is working as expected? Also please make sure to post on the issue thread to let us know you're working on it so we can avoid any duplication of work.
Sure ! I will add the test file as well at the earliest .
Closing this PR as this was completed in #77 - thanks for the contribution @Vortex-21!
Description
Added validation to ensure strings are in proper format so they can be converted to floating point numbers .
Related Issue
https://github.com/dotimplement/HealthChain/issues/68
Changes Made
-Added validation with custom logic using pydantic field_validator .
Testing
Tested against cases : 1) where string is not in proper float number format . (e.g : "abc", "12#", ".#", "", etc) 2) where "value" is passed as float itself. (e.g : 12.0, .9, 8. ,etc.)
Checklist
Additional Notes