I have here my simulation of my actual code.

What I need to do is that if the date format is not valid, it should return false and will not submit.

```js
function validateDate(DateField) {
     var regDate = /^([0-9]{2})\.([0-9]{2})\.([0-9]{4})$/;

     if(DateField.value.length > 0) {
         if(regDate.test(DateField.value) == false) {
             alert('Date Format should be dd.mm.yyyy!');
             document.getElementById("lblTest").style.color = "red";
             return false;
         } else {
             document.getElementById("lblTest").style.color = "black"
             return true;
         }
     } else {
         document.getElementById("lblTest").style.color = "black";
         return true;
     }
 }

  $("#submit").click(function(){
    //condition should be here but right now I dont know what this should be
  });
```

```html
<form method="post">
    <label id="lblTest">Date</label>
    <input type="test" placeholder="dd.mm.yyyy" id="txtDate" onblur="validateDate(this);">
    <input type="button" id="submit" formaction="www.google.com" value="Submit">
</form>
```