ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
HasNumbers.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(Data\Factory $data_factory, \ILIAS\Language\Language $lng)
29 {
31 static function (Data\Password $value): bool {
32 return (bool) preg_match('/[0-9]/', $value->toString());
33 },
34 static function ($value): string {
35 return "Password must contain numbers.";
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(Data\Factory $data_factory, \ILIAS\Language\Language $lng)
Definition: HasNumbers.php:28
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