diff --git a/src/Validator/Constraints/BannedScripts.php b/src/Validator/Constraints/BannedScripts.php index b6ff25d..2b27445 100644 --- a/src/Validator/Constraints/BannedScripts.php +++ b/src/Validator/Constraints/BannedScripts.php @@ -49,7 +49,7 @@ public function getCharacterClass(): string { if (!isset($this->characterClass)) { $this->scripts = array_map(fn (Script|string $v) => is_string($v) ? Script::from($v) : $v, $this->scripts); - $this->characterClass = sprintf('[%s]', implode('', array_map(fn (Script $script) => sprintf('\p{%s}', $script->value), $this->scripts))); + $this->characterClass = sprintf('[%s]', implode('', array_map(fn (Script $script) => sprintf('\\p{%s}', $script->value), $this->scripts))); } return $this->characterClass;