mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 11:33:46 +01:00
Fix alias validator.
This commit is contained in:
@@ -121,7 +121,7 @@ class Validator
|
|||||||
*/
|
*/
|
||||||
public function validateAlias($value)
|
public function validateAlias($value)
|
||||||
{
|
{
|
||||||
if (preg_match('/[A-Za-z_][A-Za-z0-9_]+/', $value) !== 1) {
|
if (preg_match('/^[A-Za-z_]+[A-Za-z0-9_]+$/', $value) !== 1) {
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
$this->translator->translate('invalidAlias', 'leaflet')
|
$this->translator->translate('invalidAlias', 'leaflet')
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user