- Using https://github.com/RobinHerbots/jquery.inputmask to make 'tel' inputs
$(":input[type=tel]").inputmask("0999-999-999[9]");
- Using http://parsleyjs.org/ to validate phone input in client-side
<input type="tel" class="form-control" id="contact-phone" name="contact_phone"
pattern="0[0-9]{3}\-[0-9]{3}\-[0-9]{3,4}"
placeholder="Phone" required>
- Using https://github.com/Respect/Validation to validate phone in server-side
v::attribute('contact_phone', v::regex('#^0[0-9]{3}\-[0-9]{3}\-[0-9]{3,4}$#mius'))