| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 lmb_require('limb/validation/src/rule/lmbSingleFieldRule.class.php'); 10 lmb_require('limb/i18n/src/datetime/lmbLocaleDate.class.php'); 11 12 /** 13 * class lmbLocaleDateRule. 14 * 15 * @package validation 16 * @version $Id$ 17 */ 18 class lmbLocaleDateRule extends lmbSingleFieldRule 19 { 20 protected $locale; 21 22 function __construct($field_name, $locale = null) 23 { 24 $this->locale = $locale; 25 parent :: __construct($field_name); 26 } 27 28 function check($value) 29 { 30 $toolkit = lmbToolkit :: instance(); 31 32 if(!$this->locale) 33 $this->locale = $toolkit->getLocaleObject(); 34 35 if(!lmbLocaleDate :: isLocalStringValid($this->locale, $value)) 36 $this->error(lmb_i18n('{Field} must have a valid date format', 'validation')); 37 } 38 } 39 40 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Oct 14 04:47:40 2008 | Cross-referenced by PHPXref 0.7 |