issue in numeric validation javascript
<p>I am using a phone number field in my web page. I need to check whether the value entered in that field should numeric and 10 digit number. For that i used the following code.</p>

<pre><code>var phonead;
function checkphonead(int){
   var filter=/^[0-9]{10}$/;
   if (filter.test(int)) {
      phonead = true;
   }
   else {
      phonead = false;
   }
   return phonead;
}

if(document.admission_form.phone.value=='') {
   alert("Please enter your phone number");
   document.getElementById('phone').focus();
   return false; 
}


if(checkphonead(document.getElementById('phone').value) == false) {
   alert("Please enter a 10 digit phone number!");
   document.getElementById('phone').focus();
   return false;
}
</code></pre>

<p>If I submit the form with any phone number it just saved as <code>2147483647</code> in the database. If I remove the above script, the correct phone number value has saved in the database. I couldn't trace why it happens. Any suggestion?</p>
