diff --git a/CHANGELOG.md b/CHANGELOG.md index c94cd6b7f..8e43e6294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ - Each environment now has a dedicated docker-compose--deploy.yml. Use `environment:init` to create a new environment and generate a corresponding file for customizable configurations. - 🔒 OpenHIM console is no longer exposed via HTTP. - Ansible playbooks are refactored into smaller task files. +- Resolved the issue of National ID validation to prevent the informant, father, and mother from having the same ID. ### New features diff --git a/src/form/common/default-validation-conditionals.ts b/src/form/common/default-validation-conditionals.ts index e3f3ed41d..0cd063d3a 100644 --- a/src/form/common/default-validation-conditionals.ts +++ b/src/form/common/default-validation-conditionals.ts @@ -317,7 +317,7 @@ export function getNationalIDValidators(configCase: string): Validator[] { }, { operation: 'duplicateIDNumber', - parameters: ['mother.iD'] + parameters: ['mother.motherNationalId'] } ] } else if (configCase === 'mother') { @@ -328,7 +328,7 @@ export function getNationalIDValidators(configCase: string): Validator[] { }, { operation: 'duplicateIDNumber', - parameters: ['father.iD'] + parameters: ['father.fatherNationalId'] } ] } else if (configCase === 'deceased') { @@ -339,7 +339,7 @@ export function getNationalIDValidators(configCase: string): Validator[] { }, { operation: 'duplicateIDNumber', - parameters: ['informant.informantID'] + parameters: ['informant.informantNationalId'] } ] } else if (configCase === 'groom') { @@ -350,7 +350,7 @@ export function getNationalIDValidators(configCase: string): Validator[] { }, { operation: 'duplicateIDNumber', - parameters: ['bride.iD'] + parameters: ['bride.brideNationalId'] } ] } else if (configCase === 'bride') { @@ -361,7 +361,7 @@ export function getNationalIDValidators(configCase: string): Validator[] { }, { operation: 'duplicateIDNumber', - parameters: ['groom.iD'] + parameters: ['groom.groomNationalId'] } ] } else { @@ -373,23 +373,23 @@ export function getNationalIDValidators(configCase: string): Validator[] { }, { operation: 'duplicateIDNumber', - parameters: ['deceased.deceasedID'] + parameters: ['deceased.deceasedNationalId'] }, { operation: 'duplicateIDNumber', - parameters: ['mother.iD'] + parameters: ['mother.motherNationalId'] }, { operation: 'duplicateIDNumber', - parameters: ['father.iD'] + parameters: ['father.fatherNationalId'] }, { operation: 'duplicateIDNumber', - parameters: ['groom.iD'] + parameters: ['groom.groomNationalId'] }, { operation: 'duplicateIDNumber', - parameters: ['bride.iD'] + parameters: ['bride.brideNationalId'] } ] }