I am trying to validate a phone number. The website is US based but the clients can be from all over the world. I am using jQuery to validate the input. I would be very thankful for the hints given for validation. Thanks.
<input
name="phone"
type="text"
id="phone"
minlength="7"
maxlength="15"
style="
font-family: Verdana;
color:#FFFFFF;
font-size: 13px;
background-color: #0E0E0F;
border: 1px solid #740086;
width:385px;
margin-bottom:10px;
"
size="385"
value="Phone #"
onfocus="if(this.value==this.defaultValue)this.value='';"
onblur="if(this.value=='')this.value=this.defaultValue;"/>
User JQuery validation engine..its easy..cool and the cleanest validation framework I have seen yet..
http://www.position-relative.net/creation/formValidator/This plugin already take care for phone number validation..if thats not sufficient then you can add your own custom regular expression to perform the validation.