D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
www
/
partymaker.in
/
assets
/
front_end
/
js
/
Filename :
validation.js
back
Copy
function footerappoinment(){var fooapname=document.getElementById("fooapname");if(fooapname.value==""){document.getElementById("error-msg").innerHTML="Please Enter Name.";fooapname.focus();return false;}var letter=/^[a-zA-Z\s-, ]+$/;if(!fooapname.value.match(letter)){document.getElementById("error-msg").innerHTML="Please Enter Valid Name.";fooapname.focus();return false;}if(fooapname.value.length<4||fooapname.value.length>30){document.getElementById("error-msg").innerHTML="Please Enter Valid Name." fooapname.focus();return false;}var re=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;var fooapemail=document.getElementById("fooapemail");if(fooapemail.value==""){document.getElementById("error-msg").innerHTML="Please Enter Email id";fooapemail.focus();return false;}if(!fooapemail.value.match(re)){document.getElementById("error-msg").innerHTML="Please Enter Valid Email id";fooapemail.focus();return false;}var fooapcontact=document.getElementById("fooapcontact");if(fooapcontact.value==""){document.getElementById("error-msg").innerHTML="Please Enter Mobile Number.";fooapcontact.focus();return false;}var PhonePat=/^[0-9]+$/;if(!fooapcontact.value.match(PhonePat)){document.getElementById("error-msg").innerHTML="Please Enter Valid Mobile Number.";fooapcontact.focus();return false;}var fooapcountry=document.getElementById("fooapcountry");if(fooapcountry.value==""){document.getElementById("error-msg").innerHTML="Please Select Your Country .";fooapcountry.focus();return false;}var fooapmessage=document.getElementById("fooapmessage");if(fooapmessage.value==""){document.getElementById("error-msg").innerHTML="Please Enter Your Message.";fooapmessage.focus();return false;}var fooapcaptcha=document.getElementById("fooapcaptcha");if(fooapcaptcha.value==""){document.getElementById("error-msg").innerHTML="Please Enter Captcha Code.";fooapcaptcha.focus();return false;}}function contactvalidation(){var contactname=document.getElementById("contactname");if(contactname.value==""){document.getElementById("error-msgcon").innerHTML="Please Enter Name.";contactname.focus();return false;}var letter=/^[a-zA-Z\s-, ]+$/;if(!contactname.value.match(letter)){document.getElementById("error-msgcon").innerHTML="Please Enter Valid Name.";contactname.focus();return false;}if(contactname.value.length<4||contactname.value.length>30){document.getElementById("error-msgcon").innerHTML="Please Enter Valid Name." contactname.focus();return false;}var re=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;var contactemail1=document.getElementById("contactemail1");if(contactemail1.value==""){document.getElementById("error-msgcon").innerHTML="Please Enter Email id";contactemail1.focus();return false;}if(!contactemail1.value.match(re)){document.getElementById("error-msgcon").innerHTML="Please Enter Valid Email id";contactemail1.focus();return false;}var contact=document.getElementById("contact");if(contact.value==""){document.getElementById("error-msgcon").innerHTML="Please Enter Mobile Number.";contact.focus();return false;}var PhonePat=/^[0-9]+$/;if(!contact.value.match(PhonePat)){document.getElementById("error-msgcon").innerHTML="Please Enter Valid Mobile Number.";contact.focus();return false;}if(contact.value.length<10||contact.value.length>10){document.getElementById("error-msgcon").innerHTML="Please enter valid Mobile Number." contact.focus();return false;}var contactsubject=document.getElementById("contactsubject");if(contactsubject.value==""){document.getElementById("error-msgcon").innerHTML="Please Enter Your Message.";contactsubject.focus();return false;}var contactmessage=document.getElementById("contactmessage");if(contactmessage.value==""){document.getElementById("error-msgcon").innerHTML="Please Enter Your Message.";contactmessage.focus();return false;}}function trimname(string){return string.replace(/[0-9]/g,'');}function checkNumber(textBox){while(textBox.value.length>0&&isNaN(textBox.value)){textBox.value=textBox.value.substring(0,textBox.value.length-1)}textBox.value=trim(textBox.value);}function hasALetter(text){var regex=new RegExp("[a-zA-Z]");if(text.match(regex)){return true;}else{return false;}}function checkName(textValue){while(textValue.value.length>0&&!hasALetter(textValue.value)){textValue.value=textValue.value.substring(0,textValue.value.length-1)}textValue.value=trimname(textValue.value);}