Comment to 'How to add the Phone Input minimum & maximum length using a raw block?'
  • Here we go! I've found the solution using a jQuery function and it works. I am sharing it.

    In the Page app > System > Sign Up > Settings > Injection, place the following code:

    <script>
    $(document).ready(function()
    {
      $("input[name=phone]").prop('minlength','12');
      $("input[name=phone]").prop('maxlength','12');
    });
    script>
    

    Please replace '12' with whatever value.

    Note: This code doesn't work if put in a raw block. It works in the page injection only.

    You can also use it with the Phone input on the 'Forgot Password' and 'Edit Account' page if you want.

    As you may have noticed, a similar function (option) already exists in the Phone field:

    Check for: Data Length (limit amount of characters: Min Value and Max Value)

    I couldn't use it as I will be using a Regular Expression for something else in the same field. Two functions cannot be used simultaneously in the 'Check for' field. One gets disabled automatically.

    Regards!