Kennitala
Kennitala copied to clipboard
Random numbers below 20 are considered valid
In #6 you confirmed that the 7-8th digit should start at 20, and fixed the generator.
But isPerson returns true for the 7-8th numbers below 20.
For instance 070222-0000 returns true, but is invalid.
I think we discussed this before, the 7-8th numbers start at 20 right now but I think that is a decision by Þjóðskrá, so maybe in the future they decide to start counting at 00 and I'm not sure they will let anyone know.
We could have a min 20 requirement, the advantage would be a stricter validation.
Probably worth it to add this then.
Since the generator starts at 20, I think the validator should do the same.
Yeah I think we'll do that, if Þjóðskrá changes the way they generate Kennitölur it will be a huge breaking change anyway so a version bump wouldn't be the worst result in that case. The big advantage is stricter validation. Lets go for it.
I'll have time over the weekend to implement a couple of the fixes for V1 and then I need to publish V2 soon so people can start validating system Id's.
This is fixed in V2, there is a beta version available now on the v2.0.0-beta.0 version.
yarn add [email protected]