Okay
  Public Ticket #1031308
Minimum length in input mask phone
Closed

Comments

  •  2
    Azhar started the conversation

    How can I restrict user to enter minimum 10 digits phone number using input mask - phone

  • [deleted] replied

    Hi Azhar,

    This can be combined with jQuery Validate library which will set the minimum length of the field:

    <input type="text" class="form-control" name="min_field" data-validate="minlength[10]" placeholder="Minimun Length Field" />

    Then to combine with input mask add this:

    <input type="text" class="form-control" name="min_field" data-validate="minlength[10]" data-mask="phone" placeholder="Minimun Length Field" />

    This should work for you.