Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pulkitsoft

    (@pulkitsoft)

    Dear @ronyp,
    Any solution about the above question?

    Thanks
    Pulkitsoft

    Plugin Author ronyp

    (@ronyp)

    Hello @pulkitsoft,

    Actually currently input field has only one validation for required is available. But you can add class to any field and with the help of jQuery, you can set validation for size.

    var minLength = 3;
    var maxLength = 10;

    $("input").on("keydown keyup change", function(){
        var value = $(this).val();
        if (value.length < minLength)
            $("span").text("Text is short");
        else if (value.length > maxLength)
            $("span").text("Text is long");
        else
            $("span").text("Text is valid");
    });

    Kind Regards,
    Rony P – Support Team

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Product Input Fields min and max length validation’ is closed to new replies.