php - validation for phone number in a form....Really Stuck -


before start flaming or @ all, read this! have regular expression verifying format of phone number entered in form correct. hoping find if knows way verify if number exists...so if number doesnt exist , user enters it, user error message phone number not exist , prompted enter working phone number....

i have looked on seas of google not find phone number validator not format checker regex...

this last hope..

in order check if phone number exists (and belongs user who's filling form), see 1 solution : try communicate phone.

what's done sending sms validation code phone number -- , ask user type code once has received sms.

this way, you'll sure :

  • the phone number exists,
  • and belongs current user.


of course, make sure put security measure in place, prevent using form spam number :

  • make sure 1 user cannot send more x sms per hour/day,
  • make sure no more 2 or 3 sms can sent same number per day/week

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -