ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
HasSpecialChars.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Refinery\Password
;
22
23
use
ILIAS\Refinery\Custom\Constraint
;
24
use
ILIAS\Data
;
25
use
ilLanguage
;
26
27
class
HasSpecialChars
extends
Constraint
28
{
29
private
const
ALLOWED_CHARS
=
'/[,_.\-#\+\*?!%ยง\(\)\$]/u'
;
30
31
public
function
__construct
(Data\
Factory
$data_factory,
ilLanguage
$lng
)
32
{
33
parent::__construct
(
34
static
function
(Data\
Password
$value):
bool
{
35
return
(
bool
) preg_match(self::ALLOWED_CHARS, $value->toString());
36
},
37
static
function
($value):
string
{
38
return
"Password must contain special chars."
;
39
},
40
$data_factory,
41
$lng
42
);
43
}
44
}
ilLanguage
ILIAS\Refinery\Constraint
A constraint encodes some resrtictions on values.
Definition:
Constraint.php:31
ILIAS\Data\Password
A password is used as part of credentials for authentication.
Definition:
Password.php:16
Constraint
ILIAS\Refinery\Password
Definition:
Group.php:21
ILIAS\MetaData\Repository\Validation\Data\__construct
__construct(VocabulariesInterface $vocabularies)
Definition:
VocabularyBridge.php:31
Factory
$lng
$lng
Definition:
save_question_post_data.php:24
ILIAS\Refinery\Password\HasSpecialChars\ALLOWED_CHARS
const ALLOWED_CHARS
Definition:
HasSpecialChars.php:29
ILIAS\Refinery\Password\HasSpecialChars
Definition:
HasSpecialChars.php:27
ILIAS\Refinery\Password\HasSpecialChars\__construct
__construct(Data\Factory $data_factory, ilLanguage $lng)
Definition:
HasSpecialChars.php:31
ILIAS\Data
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
Alphanumeric.php:11
src
Refinery
Password
HasSpecialChars.php
Generated on Wed Sep 10 2025 14:12:07 for ILIAS by
1.8.13 (using
Doxyfile
)