$(document).ready(function(){
  var postcodeinput = $("form[name=myForm2] input[name=fullpostcode]");
  var postcodemessage = "Please enter your FULL postcode";
  var postcodevalue = "Enter Your Postcode";
  
  $("form[name=myForm2]").submit(function() {
    var mypostcodeinput = $(this).find("input[name=fullpostcode]");
    if (mypostcodeinput.val() == ""){
      alert(postcodemessage);
      mypostcodeinput.focus();
      return false;
    } 

    if (mypostcodeinput.val() == postcodevalue){
      alert(postcodemessage);
      mypostcodeinput.focus();
      return false;
    } 

    if (mypostcodeinput.val().length < 5 ){
      alert(postcodemessage);
      mypostcodeinput.focus();
      return false;
    }
  });
  
  postcodeinput.focus(function(){
      if ($(this).val() == postcodevalue) {
        $(this).val("");
      }
    });
  postcodeinput.blur(function(){
      if ($(this).val() == "") {
        $(this).val(postcodevalue);
      }
    });
});

