lanka-validations - v2.1.0
    Preparing search index...

    Function isValidBankCode

    • Validates whether the given code is a valid 4-digit CBSL bank code.

      Parameters

      • code: unknown

        Four-digit CBSL bank code, as text or a number.

      Returns boolean

      true if the code belongs to a bank in the CBSL table.

      isValidBankCode('7010'); // true
      isValidBankCode('0000'); // false