3 declare(strict_types=1);
45 function ($value) use ($constraints):
bool {
47 $this->failed_constraints = [];
48 foreach ($constraints as $constraint) {
49 if (!$constraint->accepts($value)) {
50 $this->failed_constraints[] = $constraint;
57 function (
$txt, $value):
string {
59 foreach ($this->failed_constraints as $constraint) {
60 $messages[] = $constraint->getErrorMessage($value);
A constraint encodes some resrtictions on values.
$messages
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(array $constraints, Data\Factory $data_factory, ilLanguage $lng)
__construct(Container $dic, ilPlugin $plugin)
array $failed_constraints
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...