From 47bbcedfe23778c520a23adf58dc88f31167339a Mon Sep 17 00:00:00 2001 From: michalsn Date: Mon, 23 Sep 2024 14:28:34 +0200 Subject: [PATCH] cs fix --- system/Validation/Validation.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/system/Validation/Validation.php b/system/Validation/Validation.php index 4ccef2c637c2..61dc87894076 100644 --- a/system/Validation/Validation.php +++ b/system/Validation/Validation.php @@ -928,14 +928,15 @@ protected function getErrorMessage( // Check if custom message has been defined by user if (isset($this->customErrors[$field][$rule])) { return lang($this->customErrors[$field][$rule], $args); - } elseif (null !== $originalField && isset($this->customErrors[$originalField][$rule])) { + } + if (null !== $originalField && isset($this->customErrors[$originalField][$rule])) { return lang($this->customErrors[$originalField][$rule], $args); - } else { - // Try to grab a localized version of the message... - // lang() will return the rule name back if not found, - // so there will always be a string being returned. - return lang('Validation.' . $rule, $args); } + + // Try to grab a localized version of the message... + // lang() will return the rule name back if not found, + // so there will always be a string being returned. + return lang('Validation.' . $rule, $args); } /**