I\'m using the HTML5 \"pattern\" attribute for client side validation (please don\'t tell me about server-side validation, I have that). I want to use a Javascript or jQuery
On the submit event of your form (or wherever), validate it using its existing pattern property.
var input = document.getElementsByName('contact[phone]')[0],
isValid = input.value.search(new RegExp(input.getAttribute('pattern'))) >= 0;
jsFiddle.
You will want to check browser compatibility first to see if it supports the pattern attribute. You can do that with Modernizr.