Phone number is validated using jquery that only numbers are allowed to enter.Here is code for text box validation for numbers.
$(‘#phone’).bind(‘keyup blur’,function(){   
      $(this).val( $(this).val().replace(/[^1-9]/g,”) );
 }  );
This script validates text box value in a way that when key up event or blur event occur then only numbers allowed are validated using regular expression.

Leave a Reply

Your email address will not be published. Required fields are marked *