Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

negative value for age input #1375 #1379

Conversation

yashgoyal0110
Copy link

@yashgoyal0110 yashgoyal0110 commented Jan 8, 2025

fixes #1375

  • The PR title includes a brief description of the work done, including the
    Issue number if applicable.
  • The PR includes a video showing the changes for the work done.
  • The PR title follows conventional commit label standards.
  • The changes confirm to the OpenElis Global x3 Styleguide and design
    documentation.
  • The changes include tests or are validated by existing tests.
  • I have read and agree to the Contributing Guidelines of this project.

Summary

Screenshots

[Add relevant screenshots here if applicable]

Related Issue

[Add a link to the related issue or mention it here if applicable]

Other

[Add any additional information or notes here]

@yashgoyal0110
Copy link
Author

yashgoyal0110 commented Jan 8, 2025 via email

@yashgoyal0110
Copy link
Author

yashgoyal0110 commented Jan 9, 2025 via email

placeholder={intl.formatMessage({
id: "patient.information.days",
})}
/>
<div className="error">
<ErrorMessage name="birthDateForDisplay"></ErrorMessage>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you remove this error message intentionally ??

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nopes should i fix it?

id="days"
min="0" // Prevent negative days
max="30" // Limit days to 0–30
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you cant hard code 30 as the max days as this varies depensidn on the month

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay will change it to 31 or can make changes to code on month conditions also

max="11" // Limit months to 0–11
onChange={(e) => {
let value = parseInt(e.target.value || 0);
value = Math.min(11, Math.max(0, value)); // value between 0 and 11
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Logic is already handles

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which line, can you please explain a bit?

@github-actions github-actions bot added the merge conflict Merge Conflicts label Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

👋 Hi, @yashgoyal0110,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@yashgoyal0110
Copy link
Author

@mozzy11 do we have some update?

@mozzy11
Copy link
Collaborator

mozzy11 commented Jan 16, 2025

Thanks @yashgoyal0110 .
This was fixed by @harshitg927 here #1375

@mozzy11 mozzy11 closed this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge conflict Merge Conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix: Prevent negative age input values in New Patient form
2 participants