Files
iTop/sources/Form/Validator/CustomRegexpValidator.php
Pierre Goiffon 6606af71ff N°6414 Validator refactoring
New AbstractValidator class, with new method Validate
All existing validators are now children of AbstractRegexpValidator
Handle validators JS counterparts in renderers : only regexp validators are implemented client side
2023-07-03 11:30:04 +02:00

22 lines
507 B
PHP

<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Form\Validator;
/**
* @since 3.1.0 N°6414
*/
class CustomRegexpValidator extends AbstractRegexpValidator
{
public const VALIDATOR_NAME = 'custom_regexp';
public function __construct(string $sRegExp, ?string $sErrorMessage = null)
{
parent::__construct($sErrorMessage);
$this->sRegExp = $sRegExp; // must be done after parent constructor call !
}
}