CoreFiles by mySites.guru
LessThanValidator.php31 lines, 759 bytes, from Joomla_5.2.4-Stable-Full_Package.zip
Raw History Compare with 5.2.3
md5
e1c2b46fec3c2ee05e6982330c1cef39
sha1
1e33c8a82b24f4947a1ab6699bd08ba48c723940
sha256
73f0ff35208163f9b8a4d3e693f9a8cea269ff23980ee7d6cc837523f7d4d24d
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Validator\Constraints;

/**
 * Validates values are less than the previous (<).
 *
 * @author Daniel Holmes <[email protected]>
 * @author Bernhard Schussek <[email protected]>
 */
class LessThanValidator extends AbstractComparisonValidator
{
    protected function compareValues(mixed $value1, mixed $value2): bool
    {
        return null === $value2 || $value1 < $value2;
    }

    protected function getErrorCode(): ?string
    {
        return LessThan::TOO_HIGH_ERROR;
    }
}

The same content is in 136 releases, Joomla 5.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.