Need Mobile Validation Script

Discussion in 'PHP' started by kolucoms6, Mar 27, 2011.

  1. #1
    Anyone has Mobile Number validation Script ?

    I already have a SMS Gateway with me but Before any of my user sends any sms , I want them to get their Mobile Number validated.

    I can use Mysql db.
     
    kolucoms6, Mar 27, 2011 IP
  2. CodeMaster1233

    CodeMaster1233 Well-Known Member

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    106
    #2
    I don't think you'll find a solution here.

    Most of the sites use third party SMS gateways.
     
    CodeMaster1233, Mar 30, 2011 IP
  3. Tomastamm

    Tomastamm Well-Known Member

    Messages:
    448
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Tomastamm, Apr 3, 2011 IP
  4. shrikrishnatechnologies

    shrikrishnatechnologies Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    //To validate a mobile number 
    // it will validate 0-9 numbers.
    function ToCellValidate(objMobileNo)
    {
    if(objMobileNo.value!="")
    {
    var incomingString=objMobileNo.value;
    if(trimSpace(incomingString).length > 15 || incomingString.search(/[^0-9\-()+]/g) != -1 )
    {
    alert('Please enter valid mobile number');
    objMobileNo.focus();
    objMobileNo.value="";
    return false;
    }
    else
    return true; 
    }
    }
    
    Code (markup):