Every shipped identifier type is driven by the cited corpus in
test/stdnum/vectors.edn.
Each corpus entry has this shape:
:iban {:valid ["GB82WEST12345698765432"]
:invalid ["GB82WEST12345698765433"]
:source "ISO 13616 worked example"}
:source is mandatory. It names the standard, registry, government page,
issuer publication, or live service that makes the vector re-checkable.
test/stdnum/vectors.edn entry with :valid, :invalid, and
mandatory :source.stdnum.core.For EU VAT values that are confirmed as live-registered companies, add
:vies true; the integration test re-checks those against the live VIES
service.
Do not publish a validator that rejects valid real-world numbers.
Ambiguous or unverifiable formats stay out until there is a confirmed real vector from an authoritative source. The corpus comes first because it defines what the validator is allowed to claim.
stdnum-clj follows the same basic idea as python-stdnum: standard numbers are
small APIs, but their correctness depends on published examples and testable
rules.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |