> ## Documentation Index
> Fetch the complete documentation index at: https://gobl-changelog-gobl-0-503-0.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Code

Text identifier with a limit of 128 characters, no control characters, and no leading or trailing whitespace.

## Schema ID

`https://gobl.org/draft-0/cbc/code`

## Validation Rules

| Field               | Test                                                                                                                     | Validation Code / Message                                                                           |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| <small>Code</small> | <ul class="gobl-test"><li>Length between 0 and 128</li></ul>                                                             | `GOBL-CBC-CODE-01`<br />Codes must be no longer than 128 characters                                 |
| <small>Code</small> | <ul class="gobl-test"><li>Matches ^[^\s\x00-\x1f\x7f-\x9f](\[^\x00-\x1f\x7f-\x9f]*\[^\s\x00-\x1f\x7f-\x9f])?\$</li></ul> | `GOBL-CBC-CODE-02`<br />Codes must not contain control characters or leading or trailing whitespace |
