> For the complete documentation index, see [llms.txt](https://docs.b2ihealthcare.com/snow-owl-authoring-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2ihealthcare.com/snow-owl-authoring-platform/local-code-systems/validation.md).

# Validation

The following validation rules are enforced when creating a Local Code System

* **`ID`, `Title`, `URL`** fields are mandatory, ID and URL have to be unique.
* **`ID`*****,*****&#x20;`OID`*****,*****&#x20;`URL, Title`** fields cannot be edited after the creation.

The following validation rules are enforced when creating a Local Code

* **`Code`** and **`Preferred Term`** fields are mandatory, Code is autogenerated if it is not filled out.
* **`Code`** and **`Term`** are unique within the same terminology.
* **`Code`** field cannot be edited after creation.

## Run validation

The Local Code System validation can be executed via a toolbar menu option: `Tools > Validate Local Termonologies`.

<figure><img src="https://content.gitbook.com/content/N7ynFOLTw3W9Zow9AaAJ/blobs/7QBjrPRr2i9dfWCklYRR/image.png" alt=""><figcaption><p>Validate Local Terminologies option</p></figcaption></figure>

Once the validation wizard is invoked, the Local Code System targeted for validations needs to be selected from the list of available Local Code Systems.

![Validation configuration wizard](https://snowowl.atlassian.net/wiki/download/thumbnails/611027521/image2020-11-23_13-42-25.png?version=1\&modificationDate=1606135346387\&cacheVersion=1\&api=v2\&height=250)

The execution of the rules works the same as that of the general Snow Owl validation rules.

For the results, there is a dedicated tab within the **Validation Issues View**, where users can browse the reported rule violations. Double-clicking on one of the reported issues will open the relevant Local Code's editor.

<figure><img src="https://content.gitbook.com/content/N7ynFOLTw3W9Zow9AaAJ/blobs/iiRXmJL3vrmHcn0oKiVc/image.png" alt=""><figcaption><p>Local Code System related results in the Validation Issues view</p></figcaption></figure>

## Editing and authoring Reference Sets

Local Codes can be added as a map target in Map type Reference Sets.

For more information about editing and authoring Reference Sets,  please refer to the section below.

{% content-ref url="/pages/-MX7i-krf6J65hDavyHm" %}
[Adding Reference Set Members](/snow-owl-authoring-platform/reference-sets/authoring/adding-reference-set-members.md)
{% endcontent-ref %}
