Conversation
add RP in document codes
Update parseDocumentCodeId.js
parse mrz from French driving licence
| Object.assign({}, documentNumberTemplate, { | ||
| line: 1, | ||
| start: 7, | ||
| start: 0, |
There was a problem hiding this comment.
why this change? The 3 fields are separated in the description of wikipedia. They can always be reconcatenated later
There was a problem hiding this comment.
https://www.consilium.europa.eu/prado/en/FRA-BO-02002/image-7890.html
First 12 symbols represent complete Document Number. I don't think there is a case to use just part of it somewhere. Without this change all library clients should check if it's France then concatenate 3 fields to get the doc number.
I can make a pull request without this change if you don't want to break the backward compatibility.
There was a problem hiding this comment.
Thanks for the explanation. This LGTM then. No problem, we'll make a major release with all the changes.
| SWISS_DRIVING_LICENSE: 'SWISS_DRIVING_LICENSE', | ||
| FRENCH_NATIONAL_ID: 'FRENCH_NATIONAL_ID' | ||
| FRENCH_NATIONAL_ID: 'FRENCH_NATIONAL_ID', | ||
| FRENCH_DRIVING_LICENSE: 'FRENCH_DRIVING_LICENSE' |
There was a problem hiding this comment.
Could we call it EU_DRIVING_LICENSE or the french one has non-standard parts?
There was a problem hiding this comment.
There is no standard in EU driving license. As I know, French, Swiss and Netherlands driving licenses are all has unique format.
|
Thank you for the contribution! |
| "name": "@lukesolo/mrz", | ||
| "version": "3.1.3", |
There was a problem hiding this comment.
| "name": "@lukesolo/mrz", | |
| "version": "3.1.3", | |
| "name": "mrz", | |
| "version": "3.1.1", |
|
|
||
| module.exports = { | ||
| testURL: 'http://localhost', | ||
| }; |
There was a problem hiding this comment.
Hmm, as I remember I had some problems with Jest and after googling this helped me.
There was a problem hiding this comment.
Without it I get
FAIL src/parse/__tests__/td3.js
● Test suite failed to run
SecurityError: localStorage is not available for opaque origins
at Window.get localStorage [as localStorage] (node_modules/jsdom/lib/jsdom/browser/Window.js:257:15)
at Array.forEach (<anonymous>)
There was a problem hiding this comment.
could you try with testEnvironment: "node" instead?
|
@targos any idea why this branch was not merged = |
|
There are open discussions |
|
For those interested in a much smaller scope: I created a PR that only adds support for french national IDs with no administrative code. |
https://en.wikipedia.org/wiki/National_identity_card_(France)#Machine-readable_zone
Some French IDs don't have issuance code, so it's not correct to pick MRZ type by it's presence.