$(function() {
      $("#homecontactform").validate({
      rules: {
       firstname: {
         required:true,
         minlength:2
       },
       phone:{
         required:true,
	       minlength:8,
	       maxlength:15,
		     number: true
        },
        email: {
          required: true,
          email: true
        },
      },
      // Specify validation error messages
      messages: {
        firstname:{
          required:"Please enter your Name",
          minlength:"Your name must be at least 2 characters long"
        },
        phone: {
          required: "Please provide Phone no / Mobile",
		      minlength:"Your phone no must be at least 8 digit long",
		      maxlength:"Not more than 15 Numbers",
		      nubmer:"Only Numbers are Allowed"
        },
        email: "Please enter a valid email address",
      },
      submitHandler: function(form) {
        form.submit();
      }
    });
  });
  
  