Maximum and Minimum length in EJ 1 ASP.NET MVC Captcha

5 Oct 2015 / 1 minute to read

You can limit the Captcha characters by MinimumLength and MaximumLength property. MaximumLength property is used to define the maximum number of characters to be displayed in the image. MinimumLength sets minimum number of captcha characters need to display.

The following code example is used to render the Captcha with Minimum and Maximum length support.

  1. Add the following code example to the corresponding CSHTML page to render Captcha with Minimum and Maximum length support.

      @Html.EJ().Captcha("captcha").MaximumLength(6).MinimumLength(5)
  2. The following screenshot illustrates the Captcha with Minimum and Maximum length support.

Maximum-and-Minimum-length_img1

Captcha with Minimum and Maximum length