Skip to content

Commit

Permalink
cs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Oct 4, 2024
1 parent d609fdc commit 47bbced
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions system/Validation/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 47bbced

Please sign in to comment.