Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
AnourValar committed May 15, 2023
1 parent 0e75bad commit ec1d588
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/CrudService.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private function validatePrefix($prefix, string $key)
if (is_array($prefix)) {
$prefix[] = $key;
} else {
if (mb_strlen($prefix)) {
if (mb_strlen((string) $prefix)) {
$prefix .= '.';
}

Expand Down
4 changes: 4 additions & 0 deletions src/Exceptions/ValidationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class ValidationException extends \Illuminate\Validation\ValidationException
*/
public function __construct($validator, $response = null, $errorBag = 'default', $prefix = null)
{
if (is_string($validator)) {
$validator = trans($validator);
}

$prefix = $this->canonizePrefix($prefix);

if ($validator instanceof \Illuminate\Validation\Validator) {
Expand Down

0 comments on commit ec1d588

Please sign in to comment.