koblas / stdnum-js

A JavaScript library to provide functions to handle, parse and validate standard numbers.
MIT License
39 stars 26 forks source link

German Passport Number #46

Closed teebu closed 1 year ago

teebu commented 1 year ago

https://learn.microsoft.com/en-us/microsoft-365/compliance/sit-defn-germany-passport-number?view=o365-worldwide https://en.wikipedia.org/wiki/German_passport https://www.bmi.bund.de/SharedDocs/downloads/DE/veroeffentlichungen/themen/moderne-verwaltung/ausweise/personalausweis-seriennummer.pdf?__blob=publicationFile&v=15

the pdf states: The document number always begins with a letter

Format 9 to 11 characters

Pattern one letter in C, F, G, H, J, K (case insensitive) eight digits or letters in C, F, G, H, J, K, L, M, N, P, R, T, V, W, X, Y and Z (case insensitive) optional check digit Optional d/D

Character [1–9] is a digit from [0–9] or an alphanumeric character from [A-Z] except ABDEIOQSU. Character 10 is a digit from [0–9]. Character 11 is an optional character that starts with the letter 'D'.

Checksum: ??

I can't find a source for checksum, my best guess is its the same 7 3 1 pattern as National ID. You seem to have better luck finding documentation.

koblas commented 1 year ago

For some reason, I don't have enough to do at the moment (sarcasm).

Added passport support in PR # 49