jahav / czech-identifiers

A project to parse and validate various identifiers used in Czech Republic (e.g. birth number, IČO..).
https://jahav.github.io/czech-identifiers/
MIT License
0 stars 1 forks source link

Guard AccountNumber constructor parameters #7

Open jahav opened 6 years ago

jahav commented 6 years ago

AccountNumber constructor should have a guards against insertion of nonsensical numbers.

The prefix can be at most 6 digits long, so it should be in range 0-999999. The number should be at most 10 digits long, so allowed range be 0-9999999999. It also should have at least two digits, but because it is a struct and can be created with all zeros anyway, I won't check that in constructor.

Not sure what to do about bank code.

Fix xml docs after implementation.