Clarify in README that ModulusChecking is for "soft" validation
The discussion in #13 made it clear there is a set of implicit knowledge I've built up in writing the checker that isn't expressed in the README.
This should be added to help future users
for example just replied to email question by saying:
The modulus checking process is a "soft validation"
Not all sort codes can be validated using the process. Any sort code not covered by the process is therefore valid (or rather cannot be invalidated by the modulus check).
So, when you provide a sort-code the first thing it does is check if that is one of the sort codes for which the modulus checker applies. If it isn't one of those sort codes then it can't invalidate it so it returns true.
If it is one of the sort-codes within the scheme then it checks if the account number could live within the 'address space' provided. Here true means this could be a combination that has been provided by a bank (not that it definitely has). And false means that there is no way that combination could have been provided.
Even then I've only ever used it to prompt the user to re-confirm they think the details are correct since the checker and the spec can fall out of sync.
The vocalink spec is linked from the README here https://github.com/pauldambra/moduluschecker and the test cases in the code might help you check that it can return false...
Does that help? I do have an open issue to improve the README to make this clearer.
If I was writing this again I think I'd return a type that could be coerced to boolean but also held more data i.e. ModulusCheckingResult.SORTCODE_NOT_IN_SCHEME etc. Would be a breaking change now but could conceivably change things so the checker can be run in 'explain mode'.
Do ask more questions or open an issue on Github if you think you've found a bug! More than happy to investigate :)
Depending on the bank you might be able to write a console app that starts with a known valid sort-code/account-number pair and then keeps decrementing and incrementing the account number until it returns false. (I don't know for a fact that all bank have accout numbers that would be rejected although I'm pretty sure)