# Configuration

You can configure the module by creating a `cbvalidation` key in the `config/Coldbox.cfc` `moduleSettings` structure

{% code title="config/Coldbox.cfc" %}

```javascript
moduleSettings = {
    cbValidation = {
        // The third-party validation manager to use, by default it uses CBValidation.
        manager = "class path",
        // You can store global constraint rules here with unique names
        sharedConstraints = {
            name = {
                field = { constraints here }
            }
        }
    
    }
}
```

{% endcode %}

#### manager

The `manager` key by default points to `cbValidation.models.ValidationManager`.  If you would like to override or decorate our manager, then you can set the classpath of the manager to use.  This manager must adhere to our interface: `cbvalidation.interfaces.IValidationManager`

**sharedConstraints**

This structure will hold all of your shared constraints for forms or/and objects that you can easily reference by name.  It's like declaring the constraints inline but storing them globally.

{% hint style="danger" %}
**Important:** The module will register several objects into WireBox using the `@cbvalidation` namespace. The validation manager is registered as `ValidationManager@cbvalidation`
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://coldbox-validation.ortusbooks.com/v3.x-1/overview/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
