ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
HasUpperChars.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Refinery\Password;
22 
24 use ILIAS\Data;
25 use ilLanguage;
26 
28 {
29  public function __construct(Data\Factory $data_factory, ilLanguage $lng)
30  {
32  static function (Data\Password $value): bool {
33  return (bool) preg_match('/[A-Z]/', $value->toString());
34  },
35  static function ($value): string {
36  return "Password must contain upper-case characters.";
37  },
38  $data_factory,
39  $lng
40  );
41  }
42 }
A constraint encodes some resrtictions on values.
Definition: Constraint.php:31
A password is used as part of credentials for authentication.
Definition: Password.php:16
__construct(VocabulariesInterface $vocabularies)
$lng
__construct(Data\Factory $data_factory, ilLanguage $lng)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...