Within the Single Euro Payments Area (SEPA) any creditor wanting to collect money using a SEPA Direct Debit must have a unique Creditor Identifier.
The formal definition can be found in the SEPA DD Rulebook
as Data Type AT-02 - Identifier of the Creditor. The SEPA DD Implementation
Guidelines describes how the Creditor Identifier should be formatted. (These links are for CORE DDs under Release 9.0/ 9.2).

The format of a SEPA DD Creditor Identifier is AACCBBBX...X which is made up as follows

Check digits, also taking up two characters.
These are calculated using the MOD 97-10 algorithm according to ISO 7064 (in the same way that IBAN check digits are calculated).

BBB

A business code which may be allocated by the creditor. This is three characters long and the default value is ZZZ.
The business code is not used in the check digit calculation.

X...X

A country specific direct debit scheme identifier which may be up to 28 characters in length.

This Creditor Identifier validator calculates the check digits which should be used within a Creditor Identifier. It also checks for a valid SEPA Country Code.

The length of a Creditor Identifier varies according to the issuing country but is not checked by this validator. Details are available from the European Payments Council in the
Creditor Identifier Overview. (The table in version 0.9 of the SEPA DD Implementation
Guide is no longer relevant).

Other Notes.

The SEPA DD Implementation Guide only requires that the Creditor
Identifier starts with a valid ISO Country Code - not a valid SEPA Country Code.

The xml message formats exchanged by the clearing parties restrict, in schema validation, the
Creditor Identifier to be up to 35 characters long from the SWIFT character set (upper and lower case ASCII
letters; numbers; the 11 special characters
/ - ? : ( ) . , ' + space ).

“Punctuation” included in the country specific direct debit scheme
identifier is ignored by the check digit calculation algorithm.