Java Script Validation-database

I have a Java Script code(below) which validates the mobile number.and working fine.But the problem I am facing is both the valid and invalid mobile number is being inserted into database.I want only the valid mobile Number to be inserted to database..
The Code is as follows.Can any one suggest any ideas or any suggestions to change the code?Please…

function CheckINumber(INumber)

{


var INum = /^[+]{1}[0-9]{2}-\d{10}$/; 



if(INum.test(INumber)) 



 {  
             alert("Your Mobile Number Is Valid.");  
 }   

else 
{  
             alert("Your Mobile Number Is Not Valid.");   
       }  
}          




<input name="Upload" type="submit" height="25" class="uploadbutton"  onClick="CheckINumber(mobile.value);"   

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories