Skip to content

Conversation

@cibelius
Copy link
Contributor

@cibelius cibelius commented Apr 2, 2025

Description

opencrvs/opencrvs-core#8905 & opencrvs/opencrvs-core#8917

Core PR: opencrvs/opencrvs-core#9118

  • Add National ID validation:
    • Must be valid national ID (9 characters, only numbers)
    • Fathers national id must not match mothers national id, and vice versa
  • Add informant, mother & father DOB validation, must be before childs DOB
  • e2e tests are under construction here
  • Minor refactoring, e.g. move validators to own file
  • Fix some translations

Checklist

  • I have tested the changes locally, and written appropriate tests
  • I have tested beyond the happy path (e.g. edge cases, failure paths)
  • I have updated the changelog with this change (if applicable)
  • I have updated the GitHub issue status accordingly

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2025

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

@cibelius cibelius marked this pull request as ready for review April 4, 2025 07:36
@cibelius cibelius changed the title add national id validator, separate validators to own file National ID validation, informant/mother/father DOB not after child validation Apr 4, 2025
Copy link
Contributor

@makelicious makelicious left a comment

Choose a reason for hiding this comment

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

Very nice, check the translations with riku

{
message: {
defaultMessage: 'Must be a valid Birthdate',
defaultMessage: 'Must be a valid birth date',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it was intentionally change to the format QA requires. @rikukissa

https://preply.com/en/question/birth-date-or-birthdate

Copy link
Contributor Author

@cibelius cibelius Apr 4, 2025

Choose a reason for hiding this comment

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

Screenshot 2025-04-04 at 13 08 26

The new one matches V1, so should be ok 👍 capitalised "Birthdate" also sounds weird, probably more of an issue on the QA requirements

v2.event.birth.action.declare.form.section.child.field.birthLocation.label,This is the label for the field,Location of birth,Lieu de naissance
v2.event.birth.action.declare.form.section.child.field.birthType.label,This is the label for the field,Type of birth,Type d'accouchement
v2.event.birth.action.declare.form.section.child.field.dob.error,This is the error message for invalid date,Please enter a valid date,Please enter a valid date
v2.event.birth.action.declare.form.section.child.field.dob.error,This is the error message for invalid date,Must be a valid birth date,Doit être une date de naissance valide
Copy link
Contributor

Choose a reason for hiding this comment

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

Improvements. @rikukissa do we want to stick with exact same phrases

@cibelius cibelius merged commit c15f837 into develop Apr 4, 2025
2 checks passed
@cibelius cibelius deleted the ocrvs-8905 branch April 4, 2025 11:18
This was referenced May 19, 2025
This was referenced May 29, 2025
This was referenced Jun 5, 2025
@github-actions github-actions bot mentioned this pull request Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants