ValidationSettings.ValidateOnLeave Property
Gets or sets a value that specifies whether validation is performed when the editor value is changed.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | true |
|
Property Paths
You can access this nested property as listed below:
Object Type | Path to ValidateOnLeave |
---|---|
ASPxEdit |
|
EditProperties |
|
Remarks
To validate edit values on a specific action (for example, on a button click), call the client-side Validate method. To disable automatical validation when the editor’s value changes, set the ValidateOnLeave
property to false
.
<input type="button" value="Validate" onclick="ASPxClientControl.GetControlCollection().GetByName('tbTextBox2').Validate();" style="width: 127px;" />
<dx:ASPxTextBox ID="tbTextBox2" runat="server" ClientInstanceName="tbTextBox2" Width="170px">
<ValidationSettings ValidateOnLeave="False">
<RequiredField IsRequired="True" ErrorText="Field is required." />
</ValidationSettings>
</dx:ASPxTextBox>
See Also