var ph = $('#phone').val();
if(!ph && ph.length <= 0 || ph.length > 14){
isValid = false;
$('#msg_phone').html('Phone Number Required').show();
}else{
$('#msg_phone').html('').hide();
if(ph.lenght <= 10){
val = ph.substr(0,3) + "-" + ph.substr(3,3) + "-" + ph.substr(6,4);
}else if(ph.length > 10){
val = ph.substr(0,1) + "-" + ph.substr(1,3) + "-" + ph.substr(4,3) + "-" + ph.substr(7,4);
}
$('#phone').val(val);
}Page 1 of 1
AUTHOR
boss mode
php is for pussies
euler quote:die in a fire
php is for pussies
Page 1 of 1
Quick reply
Sign in to post a message.Times shown in Eastern Time (ET).
