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}$/; 


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

             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!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.