Open rithviknishad opened 4 days ago
The changes in this pull request involve updating the validateName
function in the src/common/validation.tsx
file to a simpler length check of at least three characters. The PatientRegister.tsx
and UserAdd.tsx
components have been modified to reflect this new validation logic, ensuring that the name field is now validated for length rather than format. Other validation functions and the overall structure of the components remain unchanged.
File | Change Summary |
---|---|
src/common/validation.tsx |
Updated validateName function to check if name length is at least 3 characters. |
src/components/Patient/PatientRegister.tsx |
Updated validateForm to include a required field check for name and validate its length. |
src/components/Users/UserAdd.tsx |
Simplified validation logic for first_name and last_name to require a minimum length of 3 characters. |
public/locale/en.json |
Added new key min_char_length_error for error messaging related to minimum character length. |
UserAdd
component to require a minimum length of 3 characters, which aligns with the changes made to the validateName
function in the main PR.PatientRegister
component by integrating a new validateName
function to ensure that patient names do not contain numeric values, directly relating to the changes in the validateName
function in the main PR.tested
In fields of code where rabbits play,
ThevalidateName
has hopped away.
With forms so neat and logic clear,
We celebrate this change, oh dear!
No more name checks, just let it be,
A simpler path for you and me! πβ¨
[!WARNING] There were issues while running some tools. Please review the errors and either fix the toolβs configuration or disable the tool if itβs a critical failure.
π§ eslint (1.23.1)
> If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.src/common/validation.tsx
Oops! Something went wrong! :( ESLint: 8.57.1 Error: Failed to load parser '@typescript-eslint/parser' declared in '.eslintrc.json': Cannot find module '@typescript-eslint/parser' Require stack: - /.eslintrc.json at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15) at Function.resolve (node:internal/modules/helpers:145:19) at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46) at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39) at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43) at _normalizeObjectConfigDataBody.next () at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20) at _normalizeObjectConfigData.next ( ) at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28) at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)
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 | b8d1d27de74a6401b5b33ed995ae87f8043bc280 |
Latest deploy log | https://app.netlify.com/sites/care-ohc/deploys/673f637525cb170008868674 |
Deploy Preview | https://deploy-preview-9177--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.
Latest commit: |
b8d1d27
|
Status: | β Deploy successful! |
Preview URL: | https://10fc6e18.care-fe.pages.dev |
Branch Preview URL: | https://revert-disallow-numeric-char.care-fe.pages.dev |
Passed #3942
•
b8d1d27de7: Remove special character validations for names (patients and users)
Project |
CARE
|
Branch Review |
revert-disallow-numeric-chars-in-patient-names
|
Run status |
Passed #3942
|
Run duration | 04m 57s |
Commit |
b8d1d27de7: Remove special character validations for names (patients and users)
|
Committer | Rithvik Nishad |
View all properties for this run βοΈ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
129
|
View all changes introduced in this branch βοΈ |
Reminder: To add the "needs testing" label, comment "ready for testing" on this PR.
Proposed Changes
Summary by CodeRabbit
New Features
Bug Fixes
Refactor