# Configurable Validation Criteria

Non-eCTD submissions, including veterinary and medical device submissions, often share validation criteria with similar themes, but different requirements. For example, a file's size cannot exceed 10MB for some regions, but can be up to 50MB, 100MB, or 500MB for others. Configurable validation criteria allow your organization to create _Publishing Validation Criteria_ records for each of these variations in regional requirements, specifying the individual region's requirement as a _Parameter_. Vault then uses the regional _Parameter_ value to determine whether a given _Content Plan Item_ is valid during [continuous validation](/en/lr/48608/#continuous-validation), [continuous publishing](/en/lr/48608/#continuous_publishing), and [on-demand-publishing and validation](/en/lr/48608/#on-demand-publishing).

When Publishing users select a new _Validation Criteria Version_ field value, Vault automatically triggers on-demand validation. Validation is triggered upon saving the new value on the _Submission_ record, and only when _Enable Continuous Publishing_ is set to Yes.



<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: This feature is only available on RIM Submissions Publishing Vaults and must be configured by an Admin.</p>
    </div>
  </div>
</div>



## Configuring Validation Criteria

Configurable validation criteria rely upon _Publishing Validation Criteria_ records to define validation _Parameters_ for each region, as well as supporting _Controlled Vocabulary_ and _Constraint_ records which define the validation criteria version.

To leverage configurable validation criteria, your Vault must have the following:

* One _Controlled Vocabulary_ record for Non-eCTD Validation (the record _Name_), with the _CV Value Filter_ field set to Validation Criteria Version and _Controlled Vocabulary Type_ set to DTD XSD Version.
* One _Constraint_ record associated with the above Non-eCTD Validation _Controlled Vocabulary_ record via the _CV_4_ field.
* One _Publishing Validation Criteria_ record for each regional criteria, as defined in the _Parameter_ field. The record must also correspond to the _Controlled Vocabulary_ record for that criteria version via the _Validation Criteria Version_ field.


### Example Publishing Validation Criteria

The Health Authorities for the following countries each require that a given published document does not exceed a certain size:
* Switzerland: 200MB
* Canada: 100MB

To support these validation criteria, a Business Admin creates two (2) _Publishing Validation Criteria_ records for the validation criteria rule which verifies file size (VRSP0020) with the following metadata:

| Number | Country | Vault RIM Validation Criteria ID | Parameter | Validation Criteria Version |
|---|---|---|---|---|
| CH001 | Switzerland | RuleVRSP0020 | 200 | Non-eCTD Validation - Switzerland |
| CA001 | Canada | RuleVRSP0020 | 100 | Non-eCTD Validation - Canada |

## Configurable Validation Criteria Results

When Vault validates a non-eCTD submission using configured validation criteria, it compares the configured _Parameter_ against a _Content Plan Item_ record's _Published Output Location_ value in most cases. Conversely, when Vault validates an eCTD submission, it reviews the corresponding index/regional XML document.

The sections below provide further detail for the conditions under which a _Content Plan Item_ passes or fails validation, as well as when Vault skips validation.

### Failure Results

The table below describes each configurable validation criteria, with an example _Parameter_ and the error message users receive when the rule fails.

During validation, Vault also verifies that the _Publishing Validation Criteria_ record's _Parameter_ value is numeric (0-9) or, for RuleVRSP0024, ASCII special characters (for example, `& # \ !`) only. Configured validation rules fail when a _Parameter_ value contains unsupported characters, including spaces.

| Vault RIM Validation Criteria ID | Description | Example Parameter | Example Failure Description |
|---|---|---|---|
| RuleVRSP0020 | The file size exceeds the allowed value. | 100 | The published document size (200MB) exceeds the allowable size (100MB) |
| RuleVRSP0021 | The file path length exceeds the allowed value. | 164 | The published document's path length (167: [current path with 167 characters]) exceeds the allowable length (164) |
| RuleVRSP0022 | The folder name length exceeds the allowed value. | 50 | The published document's folder name length (65: [current folder name with 65 characters]) exceeds the allowable length (50) |
| RuleVRSP0023 | The file name length exceeds the allowed value. | 50 | The published document's file name length (79: [current file name with 79 characters]) exceeds the allowable length (50) |
| RuleVRSP0024 | The file path contains invalid characters. | %$\? | Invalid characters in the file path: [ % ] [ $ ] [ \ ] [ ? ] |

### Skip & Pass Results

* **Rule VRSP0020**: Vault skips validation when a _Content Plan Item_ does not have a published document.
* **Rules VRSP0021 through VRSP0024**: Vault skips validation when a _Content Plan Item_'s _Published Output Location_ field is blank.

Vault passes validation for all _Content Plan Items_ which meet the _Parameter_ criteria, or if the _Publishing Validation Criteria_ record's _Parameter_ value is blank.

## Equivalent eCTD Validation Criteria

The configurable criteria Vault uses to validate non-eCTD submissions correspond to the below eCTD _Publishing Validation Criteria_ records already available in your Vault:

| Description | Configurable Validation Criteria | Examples of corresponding predefined eCTD Rule <br>(_Vault RIM Validation Criteria ID_) |
|---|---|---|
| File size | RuleVRSP0020 | Rule1238 |
| File path length | RuleVRSP0021 | Rule1085 |
| Folder name length | RuleVRSP0022 | Rule15.5 |
| File name length | RuleVRSP0023 | Rule1221 |
| Invalid characters in the file path | RuleVRSP0024 | Rule1102 |
