Fix a regression itroduced by AlphaNumericalTextInputFormField

This commit is contained in:
Ludovic Poujol 2019-03-26 15:31:45 +01:00
parent 0ae9645f88
commit 15f4918258
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ class AlphaNumericalTextInputFormField extends FormField {
return FALSE;
}
if (!preg_match("/^(?!-)(?!_)[[a-zA-Z0-9-_]+(?<!-)(?<!_)$/i", $this->value)) {
if (!preg_match("/^(?!-)(?!_)[[a-zA-Z0-9-_]*(?<!-)(?<!_)$/i", $this->value)) {
if($set_error) $this->error = 'Seul les caractères a-z A-Z 0-9 sont autorisés (- et _ le sont excepté en début et fin)';
return FALSE;
}