Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function()
- {
- $("#btnCalc").click(function()
- {
- //var fullName = $("#CustName").val();
- var PhoneNum = $("#CustPhoneNum").val();
- //var regEx_PhoneNum = /\+?[0-9\/\.\(\)\-]/;
- var regEx_PhoneNum = /^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$/;
- var message = "";
- var isValidPhoneNum = regEx_PhoneNum.test(PhoneNum);
- if (!isValidPhoneNum)
- message = "<br />--Valid Phone Number required";
- //alert('valid');
- //$("form").submit();
- // var message = '--Enter your full name';
- //if (fullName == "")
- // message = "--Enter your full name";
- //if (!isValidPhoneNum)
- // message += "<br />--Valid Phone Number required";
- if(message == "")
- $("form").submit();
- else
- $("#warnings").html(message);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement