Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

html5 phone number validation with pattern and custom message

<input type="text" class="form-control" id="packet_name" name="packet_name" pattern="[^/:x22*?<>|]+" oninvalid="setCustomValidity('Invalid character in name:
  / : * ? < >.')" oninput="setCustomValidity('')" maxlength="100" required>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #phone #number #validation #pattern #custom #message
ADD COMMENT
Topic
Name
1+7 =