CoreFiles by mySites.guru
BooleanRule.php40 lines, 852 bytes, from Joomla_5.2.0-Stable-Full_Package.zip
Raw History Compare with 5.1.4
md5
4190f3cedb850295820e2ab50d532302
sha1
996db653e5e087536967176589a8df3c046d1296
sha256
3cfeabbe79b001f167f2d503ee03c7d34e13e022882e3993f72c064864c1443d
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Form\Rule;

use Joomla\CMS\Form\FormRule;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Form Rule class for the Joomla Platform.
 *
 * @since  1.7.0
 */
class BooleanRule extends FormRule
{
    /**
     * The regular expression to use in testing a form field value.
     *
     * @var    string
     * @since  1.7.0
     */
    protected $regex = '^(?:[01]|true|false)$';

    /**
     * The regular expression modifiers to use when testing a form field value.
     *
     * @var    string
     * @since  1.7.0
     */
    protected $modifiers = 'i';
}

The same content is in 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.