Closed MiniGod closed 1 week ago
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 kennitala@2.0.0-beta.0
Available in V2.0.2 now non-beta.
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
returnstrue
, but is invalid.