Validator
Namespace: UkModulusCheck.CSharp
The C# API of the library
Constructors
Constructor | Description |
new()
Signature: unit -> Validator
|
CompiledName: .ctor
|
Instance members
Instance member | Description |
LoadData(rulesPath substitutionsPath)
Signature: rulesPath:string -> substitutionsPath:string -> unit
|
Loads rules for specific sort code ranges and sort code substitution table from files
Parameters
rulesPath - path to the file containing rules from VocaLink (valacdos.txt)
substitutionsPath - path to the file containing substitutions from VocaLink (scsubtab.txt)
Output type
Exceptions
- Exceptions may be thrown when file is not accesible (e.g. not found, lack of permissions)
|
ValidateAccount(sortCode accountNo)
Signature: sortCode:SortCode -> accountNo:AccountNumber -> ValidationResult
|
Runs modulus check on UK sort code and account number given the rules and substitution tables.
Requires LoadData to be called first to initialize data tables.
Parameters
sortCode - sort code to check
accountNo - account number to check
Output type
ValidationResult - describes the validation result and the reason in case of failure
Exceptions
- Exception will be thrown when method is called before initializing the instance (calling
LoadData ).
|