Textpattern PHP Cross Reference Content Management Systems

Source: /textpattern/lib/txplib_validator.php - 139 lines - 2686 bytes - Text - Print

   1  <?php
   2  
   3  /*
   4   * Textpattern Content Management System
   5   * https://textpattern.com/
   6   *
   7   * Copyright (C) 2020 The Textpattern Development Team
   8   *
   9   * This file is part of Textpattern.
  10   *
  11   * Textpattern is free software; you can redistribute it and/or
  12   * modify it under the terms of the GNU General Public License
  13   * as published by the Free Software Foundation, version 2.
  14   *
  15   * Textpattern is distributed in the hope that it will be useful,
  16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18   * GNU General Public License for more details.
  19   *
  20   * You should have received a copy of the GNU General Public License
  21   * along with Textpattern. If not, see <https://www.gnu.org/licenses/>.
  22   */
  23  
  24  /*
  25   * Deprecation warning: This file serves merely as a compatibility layer for \Textpattern\Validator\*.
  26   * Use the respective base classes for new and updated code.
  27   * TODO: Remove in v4.next.0
  28   */
  29  
  30  /**
  31   * Main Validator class.
  32   *
  33   * @since   4.5.0
  34   * @deprecated in 4.6.0
  35   * @package Validator
  36   */
  37  
  38  class Validator extends \Textpattern\Validator\Validator
  39  {
  40  }
  41  
  42  /**
  43   * Constraint.
  44   *
  45   * Defines a single validation rule.
  46   *
  47   * @since   4.5.0
  48   * @deprecated in 4.6.0
  49   * @package Validator
  50   */
  51  
  52  class Constraint extends \Textpattern\Validator\Constraint
  53  {
  54  }
  55  
  56  /**
  57   * Tests against a list of values.
  58   *
  59   * @since   4.5.0
  60   * @deprecated in 4.6.0
  61   * @package Validator
  62   */
  63  
  64  class ChoiceConstraint extends \Textpattern\Validator\Constraint
  65  {
  66  }
  67  
  68  /**
  69   * Tests against existing section names.
  70   *
  71   * @since   4.5.0
  72   * @deprecated in 4.6.0
  73   * @package Validator
  74   */
  75  
  76  class SectionConstraint extends \Textpattern\Validator\ChoiceConstraint
  77  {
  78  }
  79  
  80  /**
  81   * Tests against existing or blank category names.
  82   *
  83   * @since   4.5.0
  84   * @deprecated in 4.6.0
  85   * @package Validator
  86   */
  87  
  88  class CategoryConstraint extends \Textpattern\Validator\ChoiceConstraint
  89  {
  90  }
  91  
  92  /**
  93   * Tests against existing form names.
  94   *
  95   * @since   4.5.0
  96   * @deprecated in 4.6.0
  97   * @package Validator
  98   */
  99  
 100  class FormConstraint extends \Textpattern\Validator\ChoiceConstraint
 101  {
 102  }
 103  
 104  /**
 105   * Validates that a value is blank, defined as equal to a blank string or equal
 106   * to null.
 107   *
 108   * @since   4.5.0
 109   * @deprecated in 4.6.0
 110   * @package Validator
 111   */
 112  
 113  class BlankConstraint extends \Textpattern\Validator\Constraint
 114  {
 115  }
 116  
 117  /**
 118   * Validates that a value is true.
 119   *
 120   * @since   4.5.0
 121   * @deprecated in 4.6.0
 122   * @package Validator
 123   */
 124  
 125  class TrueConstraint extends \Textpattern\Validator\Constraint
 126  {
 127  }
 128  
 129  /**
 130   * Validates that a value is false.
 131   *
 132   * @since   4.5.0
 133   * @deprecated in 4.6.0
 134   * @package Validator
 135   */
 136  
 137  class FalseConstraint extends \Textpattern\Validator\Constraint
 138  {
 139  }

title

Description

title

Description

title

Description

title

title

Body