• Resolved martydev

    (@martydev)


    Hi, thx for plugin.

    How set max lenght for text/number field?

    I try “a-zA-Z0-9″…. but what about max lenght?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ivan Petermann

    (@ivanpetermann)

    Hi @martydev,

    For that, try using the maxlength attribute.

    Thread Starter martydev

    (@martydev)

    thx, maxlenght work….:

    $(“#form-field-name202101”).attr(‘maxlength’,’35’);

    but acept nubmer + character + maxfield not:

    $(“#form-field-name202101”).mask(“a-zA-Z0-9”, {reverse: true});
    $(“#form-field-name202101”).attr(‘maxlength’,’35’);

    a-zA-Z0-9 – mayby syntax wrong?

    Plugin Author Ivan Petermann

    (@ivanpetermann)

    Hi @martydev,

    Try this…

    $('#form-field-name202101').attr('maxlength', '35').mask('Z', {
        'translation': {
            Z: { pattern: /[A-Za-z0-9]/, optional: true, recursive: true }
        }
    });
    Thread Starter martydev

    (@martydev)

    thx, work fine

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Max lenght’ is closed to new replies.