-
-
Notifications
You must be signed in to change notification settings - Fork 13
Validation issue #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Due to sensitive information MASKED was sent to the repo owner in private. |
Hi there! The code currently validate both "personnummer" and "samordningsnummer" which is a temporary type of personnummer used for none-permanent residents in Sweden. The "samordningsnummer" works as this: The first four digits (year(2), month(2)) is the same as with a standard personnummer, but the Is your requirement that the code ONLY take personnummer or are samordningsnummer a legal value too? |
The value that passed the validity test starts with 07077676XX, i.e. Swedish mobile number. If parsed as an (int) then I presume the leading 0 would be removed leaving us with 7077676XX but still don't see how it would return as valid. |
070776-xxxx would parse as someone born 2017 07 16 and then depending on the last 4 digits, it may or may not be validated by the lunh algorithm. If you use a integer value, it will treat it as 07 yes. |
Thanks for the clarification. But how can 070776 be parsed as 2017-07-16? Shouldn't that parse as 2007-07-76? |
Sorry, not 2017, 2007 of course, hehe. |
Ok, I see. So this was pretty much a coincidence that the last four digits passed the lunh alg as well. |
Added flag to exclude samordningsnummer. Not released a new version yet. |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
It seems that there are issues in the validation process, as for an example the below returns True
`from personnummer import personnummer
print personnummer.valid('MASKED')`
The text was updated successfully, but these errors were encountered: