Survey Form Project - User Story #9

Survey Form Project - User Story #9
0

#1

Does anyone understand how to use the min and max attributes to validate phone number entry?

Thanks for your time.


#2

As far as I know there is not way to use the min/max attributes to validate a phone number. You could look into
input type=“tel”


#3

Thank you for replying so promptly. I managed to sort it out.

<label for "tel-input" id="tel-label"><em>Phone:</em>  <!--validate minmax and numbers only-->
            <input id="tel" placeholder="enter number" type="tel" pattern='^\+?\d{11,13}' required>
          </label><br><br>