# IValidation

Namespace: **Wisej.Web**

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

Provides access to the validation events and properties property for controls that support validation.

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

```csharp
public interface IValidation
```

{% endtab %}

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

```visual-basic
Public Interface IValidation
```

{% endtab %}
{% endtabs %}

Using [IValidation](/api/wisej.web/interfaces/wisej.web.ivalidation.md) allows developers to use uniform code to access the validation-related properties and events used by the control.

```csharp

// Old code
if (control is TextBox)
((TextBox)control).InvalidMessage = "Required";
else if (control is ComboBox)
((ComboBox)control).InvalidMessage = "Required";
// etc...

// New code
if (control is IValidation)
((IValidation)control).InvalidMessage = "Required";

```

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) InvalidMessage

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the invalid message that is shown in the invalid tooltip.

## Events

### ![](/files/hsR4ok3152WyAf8J2C1u) Validated

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the control is finished validating.

### ![](/files/hsR4ok3152WyAf8J2C1u) Validating

[CancelEventHandler](https://docs.microsoft.com/dotnet/api/system.componentmodel.canceleventhandler) Fired when the control is validating.

## Implemented By

| Name                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CheckBox](/api/wisej.web/buttons/wisej.web.checkbox.md)                                                                                      | Represents a check box control.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [CheckedListBox](/api/wisej.web/lists-and-grids/checkedlistbox.md)                                                                            | Displays a [ListBox](/api/wisej.web/lists-and-grids/listbox.md) in which a check box is displayed to the left of each item.                                                                                                                                                                                                                                                                                                                       |
| [ComboBox](/api/wisej.web/lists-and-grids/combobox.md)                                                                                        | Represents a combo box control.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [DateTimePicker](/api/wisej.web/editors/wisej.web.datetimepicker.md)                                                                          | Represents a control that allows the user to select or type a date and a time.                                                                                                                                                                                                                                                                                                                                                                    |
| [DomainUpDown](/api/wisej.web/editors/domainupdown.md)                                                                                        | Represents a spinner control that displays string values.                                                                                                                                                                                                                                                                                                                                                                                         |
| [ListBox](/api/wisej.web/lists-and-grids/listbox.md)                                                                                          | Represents a control to display a list of items.                                                                                                                                                                                                                                                                                                                                                                                                  |
| [ListControl](/api/wisej.web/lists-and-grids/listcontrol.md)                                                                                  | Provides a common implementation of members for the [ListBox](/api/wisej.web/lists-and-grids/listbox.md) and [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) classes.                                                                                                                                                                                                                                                                      |
| [MaskedTextBox](/api/wisej.web/editors/maskedtextbox.md)                                                                                      | Uses a mask to distinguish between proper and improper user input.                                                                                                                                                                                                                                                                                                                                                                                |
| [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md)                                                                            | Represents a spinner control that displays numeric values.                                                                                                                                                                                                                                                                                                                                                                                        |
| [RadioButton](/api/wisej.web/buttons/wisej.web.radiobutton.md)                                                                                | Enables the user to select a single option from a group of choices when paired with other [RadioButton](/api/wisej.web/buttons/wisej.web.radiobutton.md) controls.                                                                                                                                                                                                                                                                                |
| [TextBox](/api/wisej.web/editors/wisej.web.textbox.md)                                                                                        | Represents a text box control that allows the user to enter any value.                                                                                                                                                                                                                                                                                                                                                                            |
| [TextBoxBase](/api/wisej.web/editors/wisej.web.textboxbase.md)                                                                                | Implements the basic functionality required by text controls.                                                                                                                                                                                                                                                                                                                                                                                     |
| [UpDownBase](/api/wisej.web/editors/wisej.web.updownbase.md)                                                                                  | Implements the basic functionality required by a spin box (also known as an up-down control).                                                                                                                                                                                                                                                                                                                                                     |
| [DataGridViewComboBoxEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxeditingcontrol.md)             | Represents a [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) control that can be hosted in a [DataGridViewComboBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcomboboxcell.md).                                                                                                                                                                                                                                |
| [DataGridViewDateTimePickerEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickereditingcontrol.md) | Represents a [DateTimePicker](/api/wisej.web/editors/wisej.web.datetimepicker.md) control that can be hosted in a [DataGridViewDateTimePickerCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewdatetimepickercell.md).                                                                                                                                                                                                      |
| [DataGridViewMaskedTextBoxEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxeditingcontrol.md)   | Represents a [MaskedTextBox](/api/wisej.web/editors/maskedtextbox.md) control that can be hosted in a [DataGridViewMaskedTextBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewmaskedtextboxcell.md) cell.                                                                                                                                                                                                               |
| [DataGridViewNumericUpDownEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowneditingcontrol.md)   | Represents a [NumericUpDown](/api/wisej.web/editors/wisej.web.numericupdown.md) control that can be hosted in a [DataGridViewNumericUpDownCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewnumericupdowncell.md).                                                                                                                                                                                                          |
| [DataGridViewTextBoxEditingControl](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxeditingcontrol.md)               | Represents a [TextBox](/api/wisej.web/editors/wisej.web.textbox.md) control that can be hosted in a [DataGridViewTextBoxCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtextboxcell.md) cell when the cell's [WrapMode](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md#wrapmode) is set to [False](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewtristate.md#fields). |
| [ListViewComboBox](/api/wisej.web/lists-and-grids/wisej.web.listviewcombobox.md)                                                              | The TreeViewComboBox control represents a [UserComboBox](/api/wisej.web/lists-and-grids/wisej.web.usercombobox.md) control with a [ListView](/api/wisej.web/lists-and-grids/listview.md) as the drop down panel.                                                                                                                                                                                                                                  |
| [TagTextBox](/api/wisej.web/editors/tagtextbox.md)                                                                                            | Represents a data field that displays a list of selectable and removable tags. The control recognizes tags as the user types and adds in front of the editable field.                                                                                                                                                                                                                                                                             |
| [TimeUpDown](/api/wisej.web/editors/timeupdown.md)                                                                                            | Represents a spinner control that displays [TimeSpan](https://docs.microsoft.com/dotnet/api/system.timespan) values.                                                                                                                                                                                                                                                                                                                              |
| [TreeViewComboBox](/api/wisej.web/lists-and-grids/wisej.web.treeviewcombobox.md)                                                              | The TreeViewComboBox control represents a [UserComboBox](/api/wisej.web/lists-and-grids/wisej.web.usercombobox.md) control with a [TreeView](/api/wisej.web/lists-and-grids/treeview.md) as the drop down panel.                                                                                                                                                                                                                                  |
| [TypedTextBox](/api/wisej.web/editors/wisej.web.typedtextbox.md)                                                                              | Represents a text box control that allows the user to enter a typed value.                                                                                                                                                                                                                                                                                                                                                                        |
| [Upload](/api/wisej.web/content/upload.md)                                                                                                    | Represent an upload widget. Allows users to selected one or more files and upload them to the server.                                                                                                                                                                                                                                                                                                                                             |
| [UserComboBox](/api/wisej.web/lists-and-grids/wisej.web.usercombobox.md)                                                                      | The UserComboBox control represents a [ComboBox](/api/wisej.web/lists-and-grids/combobox.md) control with a custom panel that drops down when the user clicks the down arrow.                                                                                                                                                                                                                                                                     |


---

# 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://docs.wisej.com/api/wisej.web/interfaces/wisej.web.ivalidation.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.
