Closed siwhitehouse closed 1 month ago
Check:
That scheme
value has a single hyphen in it with a string either side of 1 or more characters.
On fail:
On pass:
Check: That string preceding hyphen is a valid iso 3166-1 alpha-3 code (officially assigned code elements plus codes used in ISO/IEC 7501-1 for special machine-readable passports):
On fail:
On pass:
Check: That the string following the hyphen is one of ‘PASSPORT’, ‘TAXID’ or ‘IDCARD’.
On fail:
Valid data 1
{
"statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
"declarationSubject": "c359f58d2977",
"statementDate": "2020-03-04",
"recordId": "10478c6cf6de",
"recordType": "person",
"recordDetails": {
"isComponent": false,
"personType": "knownPerson"
},
"identifiers":{
"id": "test",
"scheme": "GBR-TAXID"
}
}
]
Valid data 2
[
{
"statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
"declarationSubject": "c359f58d2977",
"statementDate": "2020-03-04",
"recordId": "10478c6cf6de",
"recordType": "person",
"recordDetails": {
"isComponent": false,
"personType": "knownPerson"
},
"identifiers":{
"id": "test",
"scheme": "D-PASSPORT"
}
}
]
Check 1 Invalid data 1
{
"statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
"declarationSubject": "c359f58d2977",
"statementDate": "2020-03-04",
"recordId": "10478c6cf6de",
"recordType": "person",
"recordDetails": {
"isComponent": false,
"personType": "knownPerson"
},
"identifiers":{
"id": "test",
"scheme": "GBR--PASSPORT"
}
}
]
Invalid data 2
{
"statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
"declarationSubject": "c359f58d2977",
"statementDate": "2020-03-04",
"recordId": "10478c6cf6de",
"recordType": "person",
"recordDetails": {
"isComponent": false,
"personType": "knownPerson"
},
"identifiers":{
"id": "test",
"scheme": "GBRPASSPORT"
}
}
]
Invalid data 3
[
{
"statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
"declarationSubject": "c359f58d2977",
"statementDate": "2020-03-04",
"recordId": "10478c6cf6de",
"recordType": "person",
"recordDetails": {
"isComponent": false,
"personType": "knownPerson"
},
"identifiers":{
"id": "test",
"scheme": "-PASSPORT"
}
}
]
Check 2 Invalid data 1
[
{
"statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
"declarationSubject": "c359f58d2977",
"statementDate": "2020-03-04",
"recordId": "10478c6cf6de",
"recordType": "person",
"recordDetails": {
"isComponent": false,
"personType": "knownPerson"
},
"identifiers":{
"id": "test",
"scheme": "GB-PASSPORT"
}
}
]
Invalid data 2
[
{
"statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
"declarationSubject": "c359f58d2977",
"statementDate": "2020-03-04",
"recordId": "10478c6cf6de",
"recordType": "person",
"recordDetails": {
"isComponent": false,
"personType": "knownPerson"
},
"identifiers":{
"id": "test",
"scheme": "AAA-PASSPORT"
}
}
]
Check 3 Invalid data
[
{
"statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
"declarationSubject": "c359f58d2977",
"statementDate": "2020-03-04",
"recordId": "10478c6cf6de",
"recordType": "person",
"recordDetails": {
"isComponent": false,
"personType": "knownPerson"
},
"identifiers":{
"id": "test",
"scheme": "GBR-ID"
}
}
]
noting the invalid data here is formatted incorrectly, identifiers should be nested inside recordDetails and should be an array
The docs say:
For person statements, the scheme should have the pattern {JURISDICTION}-{TYPE} where JURISDICTION is an ISO 3-digit country code and TYPE is one of PASSPORT, TAXID or IDCARD.