Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakshan-Madushanka committed Aug 15, 2024
1 parent b4360c1 commit 64a98e5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Illuminate/Validation/Concerns/ValidatesAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,12 @@ public function validateUnique($attribute, $value, $parameters)
$columns = array_merge($availableColumns, $availableQualifyColumns);

if (!in_array($column, $columns)) {
$columnsList = implode(',', $columns);
$errorMsg = sprintf("The [%s] column doesnt exists in [%s] the table. Available columns: {$columnsList}", $column, $table);
$errorMsg = sprintf(
"The [%s] column doesnt exists in [%s] the table. Available columns: %s",
$column,
$table,
implode(',', $columns)
);
throw new InvalidArgumentException($errorMsg);
}

Expand Down

0 comments on commit 64a98e5

Please sign in to comment.