Skip to content
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

Nordea Personkonto validates to true with birthdate + 1 digit #32

Open
Jokab opened this issue Nov 23, 2023 · 5 comments
Open

Nordea Personkonto validates to true with birthdate + 1 digit #32

Jokab opened this issue Nov 23, 2023 · 5 comments

Comments

@Jokab
Copy link

Jokab commented Nov 23, 2023

Hi!

First of all, thanks for a great package.

I'm having an issue with Nordea Personkonto validation. It seems that the validation check will pass if you take the date of birth part of a personal number and add one digit.

For example for the fake personal number 791212-9280, the only correct account number should be 7912129280. However if I write 7912124, this also passes. For other personal numbers some other extra digit may be required, which I assume is to pass the mod checks. Another fake example is 4609271897 which passes with 4609277.

I think this may be wrong and perhaps stems from that account min and max length are not really checked anywhere. Is this by design or a bug?

Best, Jakob

@swantzter
Copy link
Owner

Hi, sorry I haven't been able to look at this yet. It's marinating as one of two unresolved emails in my personal inbox so I haven't forgotten. December just isn't the best month for FOSS work for me. Just didn't want to leave you with radio silence until then :)

@tedeh
Copy link

tedeh commented Mar 17, 2024

I also have an issue with Nordea account validation. It might not be exactly the same as the one reported here but since it concerns Nordea accounts I'm posting my feedback here anyway instead of creating a new issue.

For a made-up Nordea account like 3227-001370 (10 digits) I get validation to pass as a "type 1" account even though it is in fact invalid. Another service I'm interacting with requires Nordea accounts to be between 11-15 digits in total, including the sort code.

There are some validation requirements published here: https://www.nordea.se/privat/produkter/konton-betalningar/clearingnummer.html

I believe validating the length of Nordea numbers might improve functionality?

@swantzter
Copy link
Owner

@tedeh Det är för att det är korrekt som '3227-0001370' för typ 1 fyller man på med 0:or i början på numret för att det ska bli 11 tecken om det är för kort. (inkl clearingnr) om du kör .format() efter får du det paddat

@swantzter
Copy link
Owner

@Jokab your issue is actually because of tbe same reason mentioned above, account numbers that are entered "too short" implicitly have leading 0's to make up the correct length.

Something that could be introduced is a "strict length" mode that requires leading 0's to be specified manually instead of being implicitly added

@NiKiZe
Copy link

NiKiZe commented Mar 17, 2024

Typ1 är strikt alltid 4+7, bör inte 0 paddas.
Lika så 3300 (och 3782 som inte ska användas) är strikt alltid 4+10.

Skulle kunna ge förslag på att använda utfyllt, men inte automatiskt validera ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants