Mask Input phone number in PHP -


i new php want mask input phone number somehow wouldn't allow javascript or jquery

$_session["oh"]["phone"]=(empty($_session["oh"]["phone"]))?$_cookie["phone"]:$_session["oh"]["phone"]; 

follow kind of patterns mask phone , validate

$pattern = "/^([1]-)?[0-9]{3}-[0-9]{3}-[0-9]{4}$/i" 

reference

afaik , have used mask() jquery helps validate

$("#phone").mask("(999) 999-9999"); 

its handy use


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -