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

feat(form-val): Adding check for gaps and laps in for field arrays #736

Merged
merged 15 commits into from
Sep 10, 2024

Conversation

benjaminpaige
Copy link
Collaborator

@benjaminpaige benjaminpaige commented Aug 26, 2024

Purpose

Added a custom validation case to validate the from/to age field arrays specifically is form CS3. After some clarification from CDH it does not appear that this needs to cover the entire are range from 0-19 just that it can have no gaps, no overlaps, and from cannot be greater than the To age.

We also have an issue where we can’t compare values between inputs that live in fieldArrays. We need to add logic that regardless of which fieldArray a user is in, they can compare it with another input

Also fixed some weird padding issues for inputs with icons

Linked Issues to Close

https://qmacbis.atlassian.net/browse/OY2-29634

image

Copy link
Contributor

github-actions bot commented Aug 26, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 54.79% 4327 / 7897
🔵 Statements 54.61% 4556 / 8342
🔵 Functions 49.29% 1048 / 2126
🔵 Branches 27.3% 820 / 3003
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
lib/packages/shared-types/forms.ts 100% 100% 100% 100%
react-app/src/components/Inputs/input.tsx 100% 30% 100% 100%
react-app/src/components/RHF/Slot.tsx 100% 91.66% 100% 100%
react-app/src/components/RHF/utils/additionalRules.ts 38.57% 46.87% 33.33% 39.39% 7-8, 15-19, 16-18, 26-27, 29-33, 30, 32, 64, 94-129, 97-104, 103, 106-107, 109-112, 109-112, 115, 115, 118-125, 118-121, 120, 122-124, 123, 127, 131-160, 134-135, 137-139, 138, 141-142, 142, 144-146, 145, 148, 150-152, 151, 154-157, 162
Generated in workflow #207

Copy link
Collaborator

@jdinh8124 jdinh8124 left a comment

Choose a reason for hiding this comment

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

Looks good from what I can tell. I hope it gets through QA fine though

Copy link

codeclimate bot commented Sep 9, 2024

Code Climate has analyzed commit 2f1158b and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 0.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 54.6% (-0.2% change).

View more on Code Climate.

@benjaminpaige benjaminpaige merged commit ac38e3d into main Sep 10, 2024
16 checks passed
@benjaminpaige benjaminpaige deleted the gaps-n-laps branch September 10, 2024 15:14
Copy link
Contributor

🎉 This PR is included in version 1.5.0-val.79 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants