Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Min Length for any textbox value
posted

Hi,

I want to implement the min and max length. I could able to do it for Maxlength

.ColumnSettings(cs =>
{
cs.ColumnSetting().ColumnKey("RateIdentification1").TextEditorOptions(options =>
{
options.MaxLength(10);
});

Is there anything for MinLength?

Thanks

Indra

  • 0
    Offline posted

    The browser won't allow you to input more than 8 characters. because browser accepted less than 4 character.

  • 1320
    Offline posted

    Hello Indra,

    After investigating this further, I have determined that in order to set MinLength to an editor and to not allow less then 4 characters in a cell, validator options should be set. This could be achieved as follows:

    cs.ColumnSetting().ColumnKey("CompanyName").TextEditorOptions(op =>

    {

         op.MaxLength(10).ValidatorOptions(vo =>

         {

              vo.LengthRange(4).Required(true);

         });

    });

    Please test it on your side and let me know if you need any further information regarding this matter.

    Regards,
    Monika Kirkova,
    Infragistics