Commit 2b04b1b3 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Change preg_match() for lowercase validation

parent af193abc
Pipeline #4952 passed with stages
in 6 minutes and 53 seconds
...@@ -134,7 +134,7 @@ class ServersideValidator extends \In2code\Femanager\Domain\Validator\Serverside ...@@ -134,7 +134,7 @@ class ServersideValidator extends \In2code\Femanager\Domain\Validator\Serverside
*/ */
protected function checkLowerCharsValidation($user, $value, $validationSetting, $fieldName) protected function checkLowerCharsValidation($user, $value, $validationSetting, $fieldName)
{ {
if (preg_match('/[A-Z]/', $value) !== false) { if (preg_match('/[A-Z]/', $value) !== 0) {
$this->addError(ucfirst($fieldName) . ' may not contain upper case characters!', $fieldName); $this->addError(ucfirst($fieldName) . ' may not contain upper case characters!', $fieldName);
$this->isValid = false; $this->isValid = false;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment