-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
https://eaflood.atlassian.net/browse/IWTF-3913 This PR makes use of the new date validations to give more specific date error messages.
Quality Gate failedFailed conditions |
…- 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)
There was a problem hiding this 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)
packages/gafl-webapp-service/src/pages/concessions/date-of-birth/date-of-birth.njk
Outdated
Show resolved
Hide resolved
packages/gafl-webapp-service/src/pages/licence-details/licence-to-start/__tests__/route.spec.js
Show resolved
Hide resolved
…mplate so the relevant fields can be highlighted
There was a problem hiding this 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 => { |
There was a problem hiding this comment.
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.
Quality Gate passedIssues Measures |
https://eaflood.atlassian.net/browse/IWTF-3913
This PR makes use of the new date validations to give more specific date error messages.