Skip to main content

CaptchaValidationSettings.EnableValidation Property

Gets or sets a value that specifies whether validation is performed when the editor is set to validate when a postback occurs.

Namespace: DevExpress.Web.Captcha

Assembly: DevExpress.Web.v24.2.dll

Declaration

[DefaultValue(true)]
public bool EnableValidation { get; set; }

Property Value

Type Default Description
Boolean true

true if validation is performed when the editor is set to validate when a postback occurs; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to EnableValidation
ASP.NET MVC Extensions CaptchaSettings
.ValidationSettings .EnableValidation
ASP.NET Web Forms Controls ASPxCaptcha
.ValidationSettings .EnableValidation

Remarks

When the value of the EnableValidation property is set to true, you can also use the ValidationSettings.ValidationGroup property to specify the name of the validation group for which the editor is validated.

Example

The following part of the ASPxCaptcha - Custom Appearance online demo illustrates how to implement a captcha control with a custom appearance.

In this example, the control’s Refresh Button.ASPxCaptcha and Text Box.ASPxCaptcha are hidden, and their functionaliry is implemented in a custom manner using separate controls (the IMG element, ASPxLabel, ASPxTextBox).

function GetRefreshButton() {
    return document.getElementById("refreshButton");
}        

function OnCaptchaBeginCallback(s, e) {
    var refreshButton = GetRefreshButton();
    refreshButton.src = "Images/refreshButtonAnimated.gif";
}

function OnCaptchaEndCallback(s, e) {
    var refreshButton = GetRefreshButton();
    refreshButton.src = "Images/refreshButton.gif"; 
    tbCode.SetValue("");
...   
}
See Also