Declined
Last Updated: 01 Jun 2023 10:08 by ADMIN
cameron
Created on: 25 May 2023 15:18
Category: Captcha
Type: Feature Request
0
Define Character Set/Exclude Specific Characters

Hi Team,

I would like to request the functionality to be able to define a character set for the Telerik.Web.Captcha.  Additionally, I'd like to request a way to exclude certain characters like numbers.

Thank you!

1 comment
ADMIN
Martin
Posted on: 01 Jun 2023 10:08

Hello, Cameron,

You can define a custom set of characters that will be used to generate the Captcha using the code below. As reference is the Reset method from the CaptchaController which is used in the Captcha Overview demo:

public IActionResult Reset()
        {
            CaptchaImage newCaptcha = CaptchaHelper.GetNewCaptcha();

            newCaptcha.TextChars = CaptchaPossibleChars.CustomCharSet;
            newCaptcha.CharSet = "123456789012345678";
            HttpContext.Session.SetString("captcha" + newCaptcha.UniqueId, SerializeCaptcha(newCaptcha));

            return Json(new
            {
                captcha = Url.Action("image", "captcha", new { captchaId = newCaptcha.UniqueId }),
                captchaId = newCaptcha.UniqueId
            });
        }

You need to define at least 15-character string.

The above information will be placed in a new Knowledge Base article on the matter so that other people can use that approach.

I am therefore marking this Feature Request as declined.

Let me know if you have any questions on the matter.

Regards,
Martin
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources