[limb-svn] r5825 - 3.x/trunk/limb/validation/src/rule

svn at limb-project.com svn at limb-project.com
Mon May 7 17:44:41 MSD 2007


Author: pachanga
Date: 2007-05-07 17:44:40 +0400 (Mon, 07 May 2007)
New Revision: 5825
URL: http://fisheye.limb-project.com/changelog/limb/?cs=5825

Modified:
   3.x/trunk/limb/validation/src/rule/lmbDateRule.class.php
Log:
-- using lmbDate :: isValidDateString($str)

Modified: 3.x/trunk/limb/validation/src/rule/lmbDateRule.class.php
===================================================================
--- 3.x/trunk/limb/validation/src/rule/lmbDateRule.class.php	2007-05-07 13:44:24 UTC (rev 5824)
+++ 3.x/trunk/limb/validation/src/rule/lmbDateRule.class.php	2007-05-07 13:44:40 UTC (rev 5825)
@@ -32,14 +32,8 @@
   {
     if($this->type == lmbDateRule :: TYPE_ISO)
     {
-      try
-      {
-        new lmbDate((string)$value);
-      }
-      catch(lmbException $e)
-      {
-        $this->error('{Field} is not valid ISO format date(YYYY-MM-DD HH:MM).');
-      }
+      if(!lmbDate :: isValidDateString($value))
+        $this->error('{Field} is not a valid ISO formatted date(YYYY-MM-DD HH:MM).');
     }
   }
 }



More information about the limb-svn mailing list