Skip to content

Documentation / @einvoice-ts/validator / identifiers / mod97Be

Function: mod97Be() ​

mod97Be(value): boolean

Defined in: packages/validator/src/identifiers/mod97.ts:19

u:mod97-0208: the modulo-97 check digits of a Belgian enterprise number (PEPPOL-COMMON-R043, scheme 0208).

Port of the Schematron function: the last two digits must equal 97 - (first eight mod 97). The rule guards the call with matches(., '^[0-9]{10}$'); this port returns false for anything else.

Parameters ​

value ​

string

The identifier, whitespace-normalized.

Returns ​

boolean

true when the check digits are right.

Example ​

ts
import { mod97Be } from '@einvoice-ts/validator';

mod97Be('0123456749'); // true
mod97Be('0123456748'); // false

MIT licensed. Specification material belongs to OpenPeppol, CEN and OASIS (see NOTICE). Peppol is a trademark of OpenPeppol AISBL; this project is not affiliated with it.