Was curious how to validate a phone number input field? Currently I am requiring that the phone # format be (5555555555) so that i can simply say if(is_numeric($phone_num))
so then when i retrieve it from DB i must manipulate the string to format it properly"(555)555-5555" But i was thinking it would be easier if there was a way to just validat the proper chars "(), and -" so that they can just type it in correctly and i can make sure they did so. Just wasn't sure how to validate with it having those extra chars "().and -" in the field. thanks for any input in advance, much appreciated. :)
fuston05 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.