fix client containSymbol validate not accepting underscores

This commit is contained in:
Jérémy Munsch 2021-09-07 14:41:16 +02:00
parent b208c78b97
commit 2d0866ad74

View file

@ -175,7 +175,7 @@ class Utils
$validators[] = [
'type' => $rule,
'validate' => function () use ($data, $attribute) {
return \preg_match('/[^\w]/', $data[$attribute]);
return \preg_match('/[^a-zA-Z0-9]/', $data[$attribute]);
},
// phpcs:ignore Generic.Files.LineLength.TooLong
'error' => self::translate($attribute) . ' doit contenir au moins un caractère spécial comme une virgule par exemple'