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 = /^\d{3}-\d{3}-\d{4}$/;
- var message = "";
- var isValidPhoneNum = regEx_PhoneNum.test(PhoneNum);
- 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