function ff_validate_date_DDMMYYYY(element, message)
{
   // Regular expression used to check if date is in correct format
   var pattern = /[0-3][0-9]\/(0|1)[0-9]\/(19|20)[0-9]{2}/;
   if(pattern.test(element.value))
   {
      var date_array = element.value.split('/');
      var day = date_array[0];

      // Attention! Javascript consider months in the range 0 - 11
      var month = date_array[1] - 1;
      var year = date_array[2];

      // This instruction will create a date object
      source_date = new Date(year,month,day);

      if(year != source_date.getFullYear())
      {
         return message == '' ? 'Element ' + element.name + ' failed my test' : message;
      }

      if(month != source_date.getMonth())
      {
         return message == '' ? 'Element ' + element.name + ' failed my test' : message;
      }

      if(day != source_date.getDate())
      {
         return message == '' ? 'Element ' + element.name + ' failed my test' : message;
      }
   }
   else
   {
      return message == '' ? 'Element ' + element.name + ' failed my test' : message;
   }

   return '';
}