Skip to content

LEI_VALID

Info

New in Atfinity 17.

Description

LEI_VALID checks whether a string is a valid LEI (Legal Entity Identifier, ISO 17442) — the 20-character code used to identify legally distinct entities in financial transactions. It verifies the format and the ISO 7064 MOD 97-10 check digits. It does not verify that the LEI is registered or active in the GLEIF database.

An LEI is not country-coded — it does not tell you where the entity is based. The first four characters identify the issuing organisation (the Local Operating Unit), not a country. A German, Swiss, or UK company all have LEIs of the same shape.

Syntax

LEI_VALID(lei)

Returns: true if the LEI is structurally valid, false if not, unknown if the argument is not a string.

Example

LEI_VALID('7LTWFZYICNSX8D621K86')

Returns true — the LEI of Deutsche Bank AG.

LEI_VALID('7LTWFZYICNSX8D621K87')

Returns false — the check digits do not match.