ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
Validator.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27{
28 public const string PATTERN = '/^[a-zA-Z0-9\-_]+$/';
29
30 public function isValid(string $alias): bool
31 {
32 // only a-zA-Z0-9-_ allowed
33 return preg_match(self::PATTERN, $alias) === 1;
34 }
35}