GIF89a php
Current File : /home/hencockfreshchic/public_html/admin.cpanel/js/validVendor2.js
function validVendor2(theForm){

	var vname=$("#vname").val();
	var vemail=$("#vemail").val();
	var pwd=$("#pwd").val();
	var vcpass=$("#vcpass").val();
	var vmobb=$("#vmobb").val();
	var vpin=$("#vpin").val();
	var vcname=$("#vcname").val();
	var vadd=$("#vadd").val();
	var vgst=$("#vgst").val();

	if(vname=="")
	{
		alert("Enter name");
		$("#vname").focus();
        return false;
	}
	if(vname.length<3)
	{
		alert("Invalid name");
		$("#vname").focus();
        return false;
	}
	if(vname.length>40)
	{
		alert("Enter name");
		$("#vname").focus();
        return false;
	}


	if(vemail=="")
	{
		alert("Enter email id");
		$("#vemail").focus();
        return false;
	}
	if(vemail.length<3)
	{
		alert("Invalid email id");
		$("#vemail").focus();
        return false;
	}
	if(vemail.length>40)
	{
		alert("Enter email id");
		$("#vemail").focus();
        return false;
	}

	if(pwd=="")
	{
		alert("Enter password");
		$("#pwd").focus();
        return false;
	}
	if(pwd.length<3)
	{
		alert("Minimum words limit not exceed");
		$("#pwd").focus();
        return false;
	}
	if(pwd.length>40)
	{
		alert("Maximum words limit exceed");
		$("#pwd").focus();
        return false;
	}

	if(vcpass=="")
	{
		alert("Enter password");
		$("#vcpass").focus();
        return false;
	}
	if(vcpass.length<3)
	{
		alert("Minimum words limit not exceed");
		$("#vcpass").focus();
        return false;
	}
	if(vcpass.length>40)
	{
		alert("Maximum words limit exceed");
		$("#vcpass").focus();
        return false;
	}
	

	if(vmobb=="")
	{
		alert("Enter mobile number");
		$("#vmobb").focus();
        return false;
	}
	if(vmobb.length<10)
	{
		alert("Minimum words limit not exceed");
		$("#vmobb").focus();
        return false;
	}
	if(vmobb.length>10)
	{
		alert("Maximum words limit exceed");
		$("#vmobb").focus();
        return false;
	}
if(vpin=="")
	{
		alert("Enter pincode");
		$("#vpin").focus();
        return false;
	}
	if(vpin.length<3)
	{
		alert("Minimum words limit not exceed");
		$("#vpin").focus();
        return false;
	}
	if(vpin.length>10)
	{
		alert("Maximum words limit exceed");
		$("#vpin").focus();
        return false;
	}

	if(vcity=="")
	{
		alert("Enter vender city");
		$("#vcity").focus();
        return false;
	}
	if(vcity.length<3)
	{
		alert("Minimum words limit not exceed");
		$("#vcity").focus();
        return false;
	}
	if(vcity.length>40)
	{
		alert("Maximum words limit exceed");
		$("#vcity").focus();
        return false;
	}

	if(vcname=="")
	{
		alert("Enter vender company name");
		$("#vcname").focus();
        return false;
	}
	if(vcname.length<3)
	{
		alert("Minimum words limit not exceed");
		$("#vcname").focus();
        return false;
	}
	if(vcname.length>40)
	{
		alert("Maximum words limit exceed");
		$("#vcname").focus();
        return false;
	}

	if(vadd=="")
	{
		alert("Enter vender address");
		$("#vadd").focus();
        return false;
	}
	if(vadd.length<3)
	{
		alert("Minimum words limit not exceed");
		$("#vadd").focus();
        return false;
	}
	if(vadd.length>200)
	{
		alert("Maximum words limit exceed");
		$("#vadd").focus();
        return false;
	}
	if(vgst=="")
	{
		alert("Enter vender GST number");
		$("#vgst").focus();
        return false;
	}
	if(vgst.length<3)
	{
		alert("Minimum words limit not exceed");
		$("#vgst").focus();
        return false;
	}
	if(vgst.length>30)
	{
		alert("Maximum words limit exceed");
		$("#vgst").focus();
        return false;
	}
	return true;
	
}