ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
HasMinLength.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\Data;
25
27{
28 public function __construct(int $min_length, Data\Factory $data_factory, \ILIAS\Language\Language $lng)
29 {
31 static function (Data\Password $value) use ($min_length): bool {
32 return strlen($value->toString()) >= $min_length;
33 },
34 static function ($value) use ($min_length): string {
35 return "Password has a length less than '$min_length'.";
36 },
37 $data_factory,
38 $lng
39 );
40 }
41}
Builds data types.
Definition: Factory.php:36
A password is used as part of credentials for authentication.
Definition: Password.php:31
__construct(int $min_length, Data\Factory $data_factory, \ILIAS\Language\Language $lng)
A constraint encodes some resrtictions on values.
Definition: Constraint.php:32
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31