[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/cms/src/validation/rule/ -> lmbTreeIdentifierRule.class.php (source)

   1  <?php
   2  /*

   3   * Limb PHP Framework

   4   *

   5   * @link http://limb-project.com 

   6   * @copyright  Copyright &copy; 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  
  11  /**

  12   * class lmbTreeIdentifierRule.

  13   *

  14   * @package cms

  15   * @version $Id$

  16   */
  17  class lmbTreeIdentifierRule extends lmbSingleFieldRule
  18  {
  19    protected $parent_node_id_field_name;
  20  
  21    function check($value)
  22    {
  23      if(!preg_match('~^[a-zA-Z0-9-_\.]+$~', $value))
  24      {
  25        $this->error(lmb_i18n('{Field} can contain numeric, latin alphabet and `-`, `_`, `.` symbols only', 'cms'));
  26        return;
  27      }
  28    }
  29  }
  30  
  31  ?>


Generated: Sat Nov 22 03:48:54 2008 Cross-referenced by PHPXref 0.7