Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. $("#place_order").on('click',function(e){
  2. var mobile = $("#billing_phone").val();
  3. var pattern = /\+?(88)?01[3456789][0-9]{8}\b/;
  4. // return false;
  5. if(!pattern.test(mobile) && mobile !== ''){
  6. e.preventDefault();
  7. // $("#on_form").find(".phone-valid").after('<p class="on_warning">Please enter a valid mobile number.</p>');
  8. alert('Please enter a valid mobile number.');
  9. }
  10. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement