Closed Tanuj1718 closed 2 days ago
The changes in the PatientRegister.tsx
component focus on enhancing the validation logic for patient names within the form handling process. A new validation function, validateName
, has been introduced to ensure that names do not contain numeric values. The form initialization now includes a name field, and the validation logic has been updated accordingly. Additionally, the submission handling has been adjusted to format the name correctly before processing.
File | Change Summary |
---|---|
src/components/Patient/PatientRegister.tsx | Integrated validateName for name validation, updated form initialization to include a name field, modified validateForm for new validation, and adjusted handleSubmit for name formatting. |
Objective | Addressed | Explanation |
---|---|---|
Prevent creation of patients with numeric values in name (#9143) | ✅ |
🐇 In the garden where names bloom bright,
A rabbit hops with pure delight.
With validations strong and true,
No numbers in names, just skies so blue!
So patients' names, all neat and fair,
Are crafted with love, beyond compare! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Name | Link |
---|---|
Latest commit | 7ba4669f7d82e9e7c0fb5c4d27225e0064885c63 |
Latest deploy log | https://app.netlify.com/sites/care-ohc/deploys/673bbd5b2c060c00087fa615 |
Deploy Preview | https://deploy-preview-9152--care-ohc.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@Tanuj1718 have we also accounted for characters like underscores, dots and commas ?
@Tanuj1718 have we also accounted for characters like underscores, dots and commas ?
Yes we have checked. We only allow alphabetic characters and spaces in Name.
LGTM
@Tanuj1718 Your efforts have helped advance digital healthcare and TeleICU systems. :rocket: Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! :raised_hands:
@Tanuj1718 #9177 would be reverting this PR due to reason mentioned in https://github.com/ohcnetwork/care_fe/issues/9143#issuecomment-2491409154
@Tanuj1718 #9177 would be reverting this PR due to reason mentioned in #9143 (comment)
Okay @rithviknishad , it's always interesting to know about the new things.
Proposed Changes
https://github.com/user-attachments/assets/59b5ac7b-3ad8-477a-9a85-f5113b205f1a
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Improvements