You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure about all the details regarding the length of PN, coordination number and interim numbers but it feels like we could do a check on the length and make sure that we are dealing with 10 or 12 digits at all times?
I see we have length check already for == 0 and < 8https://github.com/personnummer/go/blob/master/personnummer.go#L214 which discourages me to put 10/12 check as it's unclear why 9 would be OK.
Minimal reproducible test case
The text was updated successfully, but these errors were encountered:
Thanks, you're right. I've fixed this before you're pull request since I've could remove some code and move around some code to make it work without the if.
Context
personnummer.Valid("19000011111")
Expected outcome
false
Actual outcome
panic
Description
Looks like all 11 digit inputs are panicking.
I am not sure about all the details regarding the length of PN, coordination number and interim numbers but it feels like we could do a check on the length and make sure that we are dealing with 10 or 12 digits at all times?
I see we have length check already for
== 0
and< 8
https://github.com/personnummer/go/blob/master/personnummer.go#L214 which discourages me to put 10/12 check as it's unclear why 9 would be OK.Minimal reproducible test case
The text was updated successfully, but these errors were encountered: