> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-docs-event-stream-action-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# UsernameValidationError

Represents a single username validation error returned during validation.

Each error has a machine-readable `code` and a human-readable `message`.

```ts Example theme={null}
export interface UsernameValidationError {
  /**
   * A unique identifier for the validation rule that failed.
   * 
   * Example: `"username-too-short"`, `"username-invalid-characters"`
   */
  code: string;

  /**
   * A human-readable description of the error.
   * 
   * Example: `"Username must be at least 3 characters long."`
   */
  message: string;

  /**
   * The field associated with the validation error, typically "username", "email", or "phone".
   */
  field: string;
}
```

## Properties

<ParamField body="code" type="string">
  A unique identifier for the validation rule that failed.

  Example: `"username-too-short"`, `"username-invalid-characters"`
</ParamField>

<ParamField body="field" type="string">
  The field associated with the validation error, typically "username", "email", or "phone".
</ParamField>

<ParamField body="message" type="string">
  A human-readable description of the error.

  Example: `"Username must be at least 3 characters long."`
</ParamField>
