Skip to content

Reject Czech and Slovak account numbers that are not divisible by 11 - #693

Open
SashaMIT wants to merge 1 commit into
Simplify:masterfrom
SashaMIT:codered-czech-mod11
Open

SashaMIT wants to merge 1 commit into
Simplify:masterfrom
SashaMIT:codered-czech-mod11

Conversation

@SashaMIT

Copy link
Copy Markdown

Summary

Czech and Slovak account numbers are valid when each part's weighted sum is divisible by 11. The check used the Spanish remainder rule and treated remainder 1 as check digit 1, so CZ8008000000612000145399 passed. Prefix 000061 weights to 13, which is not divisible by 11. CZ6508000000192000145399 still passes.

Test plan

  • The new test failed on tip (expected true to be false)
  • npm test (262 passing)

Made with Cursor

The national check used the Spanish remainder rule, so a prefix that weights to 13 was accepted.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant