Skip to main content
A newer version of this page is available. .
Tab

ASPxCaptcha.ValidationSettings Property

Gets the editor’s validation settings.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public CaptchaValidationSettings ValidationSettings { get; }

Property Value

Type Description
CaptchaValidationSettings

A CaptchaValidationSettings object that contains validation settings.

Remarks

Use the ValidationSettings property to access and customize the settings that relate to editor validation.

Example

The following part of the ASPxCaptcha - Features online demo illustrates how to customize the challenge image‘s style settings.

These settings are specified within a panel (ASPxComboBox, ASPxColorEdit editors) and applied to the captcha control via the Apply button (ASPxButton).

protected void btnApply_Click(object sender, EventArgs e) {
...
    int parseResult = 0;
    Captcha.ChallengeImage.FontFamily = cbFontFamily.Value.ToString();
    Captcha.ChallengeImage.ForegroundColor = ceForegroundColor.Color;
    Captcha.ChallengeImage.BackgroundColor = ceBackgroundColor.Color;
    Captcha.ChallengeImage.BorderColor = ceBorderColor.Color;
    if (int.TryParse(seBorderWidth.Text, out parseResult))
        Captcha.ChallengeImage.BorderWidth = parseResult;
...
}
See Also