> For the complete documentation index, see [llms.txt](https://docs.aurelia.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aurelia.io/aurelia-packages/validation/registering-the-plugin.md).

# Plugin Configuration

Like all Aurelia plugins, you'll usually configure them inside your file. Importing the configuration object from the validation package and passing it into the `register` method provided by Aurelia is all you need to do to register it.

In the previous step [here](/aurelia-packages/validation/validation-tutorial.md), we already went over this. Make sure you have the plugin and relevant adapters installed before continuing.

```typescript
import { ValidationHtmlConfiguration } from '@aurelia/validation-html';
import Aurelia from 'aurelia';

Aurelia
  .register(ValidationHtmlConfiguration)
  .app(component)
  .start();
```

This sets up the plugin with the required dependency registrations. You can also customize the validation plugin via the `customize` method, which provides an options object we can use to configure default settings.

```typescript
import { ValidationHtmlConfiguration } from '@aurelia/validation-html';
import Aurelia from 'aurelia';

Aurelia
  .register(ValidationHtmlConfiguration.customize((options) => {
    // customization callback
    options.DefaultTrigger = customDefaultTrigger;
  }))
  .app(component)
  .start();
```

The following options are available for customization.

* From `@aurelia/validation`
  * `ValidatorType`: Custom implementation of `IValidator`. Defaults to `StandardValidator`.
  * `MessageProviderType`: Custom implementation of `IValidationMessageProvider`. Defaults to `ValidationMessageProvider`.
  * `ValidationControllerFactoryType`: Custom implementation of the factory for `IValidationController`; Defaults to `ValidationControllerFactory`.
  * `CustomMessages`: Custom validation messages.
* From `@aurelia/validation-html`
  * `HydratorType`: Custom implementation of `IValidationExpressionHydrator`. Defaults to `ModelValidationExpressionHydrator`.
  * `DefaultTrigger`: Default validation trigger. Defaults to `blur`.
  * `UseSubscriberCustomAttribute`: Use the `validation-errors` custom attribute. Defaults to `true`.
  * `SubscriberCustomElementTemplate`: Custom template for `validation-container` custom element. Defaults to the default template of the custom element.

These options are explained in detail in their respective sections. Note that the categorization of the options is done with the intent of clarifying the origin package of each option. However, as the `@aurelia/validation-html` wraps `@aurelia/validation` all the customization options are available when the `@aurelia/validation-html` package is registered.

The `@aurelia/validation-i18n` package is skipped intentionally for now, as discussed in detail [later](/aurelia-packages/validation/i18n-internationalization.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.aurelia.io/aurelia-packages/validation/registering-the-plugin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
