aspnet-devexpress-dot-web-dot-aspxedit-70e87461.md
Gets or sets a value that indicates whether the editor’s value passes validation.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public virtual bool IsValid { get; set; }
Public Overridable Property IsValid As Boolean
| Type | Description |
|---|---|
| Boolean |
true if the editor’s value passes validation; otherwise, false.
|
If the ValidationSettings.EnableCustomValidation property is set to true, the IsValid property can be used to specify whether the editor’s value (ASPxEdit.Value) meets your validation criteria, and can be posted to the editor being validated.
If the entered value is not valid, you can set the IsValid property to false. In this case, the value will not be posted to the editor and a error text specified by the ASPxEdit.ErrorText property will be displayed. Or, you can correct the entered value manually by updating the editor’s value and leaving the IsValid value set to true. In this case, the corrected value will be written to the editor.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsValid property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
protected void signUp_Click(object sender, EventArgs e) {
if (eMailTextBox.IsValid && Captcha.IsValid) {
using (OleDbConnection connection = GetConnection()) {
Protected Sub signUp_Click(ByVal sender As Object, ByVal e As EventArgs)
If eMailTextBox.IsValid AndAlso Captcha.IsValid Then
Using connection As OleDbConnection = GetConnection()
See Also