I have the following code:
<?php
  $dateString = '12.12.12';
  $dateCheckArray['format'] = 'dd-mm-yyyy';
  $validator = new Zend_Validate_Date($dateCheckArray);
  if ($validator->isValid($dateString)) {
      echo 'valid';
  }
  else {
      echo 'invalid';
  }
The code works ok for most formats, but for the one specified it fails when using a . date instead of a - date.
For example for the date specified before (12.12.12) the script will echo 'valid', even though it obviously doesn't fit the format.
Can anyone point out why this is happening?
Note: This is zend 1.
 
     
    