# AutoValidate

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

Determines how a control validates its data when it loses user input focus.

{% tabs %}
{% tab title="C#" %}

```csharp
public enum AutoValidate : Enum
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Enum AutoValidate As [Enum]
```

{% endtab %}
{% endtabs %}

## Fields

| Name                         | Description                                                                                                                                                                                                                                                              |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Disable**                  | Implicit validation will not occur. Setting this value will not interfere with explicit calls to [Validate](https://docs.wisej.com/api/containers/containercontrol#validate) or [ValidateChildren](https://docs.wisej.com/api/general/control#validatechildren).         |
| **EnableAllowFocusChange**   | Implicit validation occurs, but if validation fails, focus will still change to the new control. If validation fails, the [Validated](https://docs.wisej.com/api/general/control#validated) event will not fire.                                                         |
| **EnablePreventFocusChange** | Implicit validation occurs when the control loses focus. If validation fails, the [Validated](https://docs.wisej.com/api/general/control#validated) event will not fire.                                                                                                 |
| **Inherit**                  | The control inherits its [AutoValidate](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.autovalidate) behavior from its container (such as a form or another control). If there is no container control, it defaults to [EnablePreventFocusChange](#fields). |

## Used By

| Name                                                                                                 | Description                                                                                         |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [Form.AutoValidate](https://docs.wisej.com/api/containers/form#autovalidate)                         | Returns or sets how the control performs validation when the user changes focus to another control. |
| [Page.AutoValidate](https://docs.wisej.com/api/containers/wisej.web.page#autovalidate)               | Returns or sets how the control performs validation when the user changes focus to another control. |
| [UserControl.AutoValidate](https://docs.wisej.com/api/containers/wisej.web.usercontrol#autovalidate) | Returns or sets how the control performs validation when the user changes focus to another control. |
