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

Apply more specific date error messages #2022

Merged
merged 24 commits into from
Dec 9, 2024

Conversation

irisfaraway
Copy link
Member

https://eaflood.atlassian.net/browse/IWTF-3913

This PR makes use of the new date validations to give more specific date error messages.

https://eaflood.atlassian.net/browse/IWTF-3913

This PR makes use of the new date validations to give more specific date error messages.
@irisfaraway irisfaraway added the enhancement New feature or request label Aug 19, 2024
@irisfaraway irisfaraway self-assigned this Aug 19, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
14.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

…- invalid dates were failing, but so were valid ones! Added some custom validation to rectify this
…es, added extra test for decimal values against date schema, added validation to date of birth page for no dates before 120 years ago and no dates in the future
…ions, apply them to the date of birth, start date and renewals id page (start date will be applied to renewal start date in a new ticket)
@jaucourt jaucourt marked this pull request as ready for review November 15, 2024 15:06
Copy link
Member Author

@irisfaraway irisfaraway left a comment

Choose a reason for hiding this comment

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

I can't officially approve or reject this since it's technically my PR (although looks like it's all your work!) so someone else will have to stamp this as well.

Do we need to clean up the new date validators in the business-lib since we haven't ended up using them? (createDayValidator, etc)

…mplate so the relevant fields can be highlighted
Copy link
Member Author

@irisfaraway irisfaraway left a comment

Choose a reason for hiding this comment

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

Much tidier Nunjucks files, yay! I have one nitpick about naming and then I'm happy.

}
}

export const getErrorFlags = error => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggest naming this getDateErrorFlags just so the specific purpose is more clear.

@jaucourt jaucourt merged commit 19abcb6 into develop Dec 9, 2024
4 checks passed
@jaucourt jaucourt deleted the feature/iwtf-3913-date-validation-messages branch December 9, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants