diff --git a/sources/form/validator/validator.class.inc.php b/sources/form/validator/validator.class.inc.php index f76ed63f1..4026f206d 100644 --- a/sources/form/validator/validator.class.inc.php +++ b/sources/form/validator/validator.class.inc.php @@ -57,7 +57,15 @@ class Validator */ public function GetRegExp($bWithSlashes = false) { - return ($bWithSlashes) ? '/' . $this->sRegExp . '/' : $this->sRegExp; + if ($bWithSlashes) + { + $sRet = '/' . str_replace('/', '\\/', $this->sRegExp) . '/'; + } + else + { + $sRet = $this->sRegExp; + } + return $sRet; } public function GetErrorMessage()