> 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/7.19.1/local-code-systems/validation.md).

# Validation

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

* **`Short name`*****,*****&#x20;`Name`** fields are mandatory and globally unique.
* **`Short name`*****,*****&#x20;`Name`*****,*****&#x20;`OID`*****,*****&#x20;`Maintaining organization link`** fields cannot be edited after the creation.

The following validation rules are enforced when creating a Local Code

* **`Code`** and **`Term`** fields are mandatory.
* **`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`.

![Validate Local Terminologies toolbar menu option](https://snowowl.atlassian.net/wiki/download/thumbnails/611027521/image2020-11-23_13-38-52.png?version=1\&modificationDate=1606135133825\&cacheVersion=1\&api=v2\&width=211)

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 the user can browse the reported rule violations. Double-clicking on one of the reported issues will open the relevant Local Code's editor.

![Local Code System related results within Validation results view](https://snowowl.atlassian.net/wiki/download/thumbnails/611027521/image2020-11-23_13-46-11.png?version=1\&modificationDate=1606135572356\&cacheVersion=1\&api=v2\&height=250)

## Editing and authoring Reference Sets, Value Sets, and Mapping Sets

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

A Local Code can also be the member of a Value Set or a Mapping Set

For more information about editing and authoring Reference Sets, and value domains please refer to the sections about Reference Sets and Value Sets. Guidance on editing Mapping Sets is given in the Mapping section.

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

{% content-ref url="/pages/-MXBuWCKqaM9qqPS3Pc2" %}
[Adding Members](/snow-owl-authoring-platform/7.19.1/value-sets/authoring/adding-members.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MXCHuko7VREsMqWL6FP" %}
[Add Mappings](/snow-owl-authoring-platform/7.19.1/mapping-sets/authoring/editing-mapping-sets/add-mappings.md)
{% endcontent-ref %}
