Skip to content

Commit

Permalink
Merge pull request #14 from fintechbd/LP-127-return-validation-error-…
Browse files Browse the repository at this point in the history
…on-role-permission-update

LP-12 role update unique value fixed
  • Loading branch information
mah-shamim authored Nov 8, 2023
2 parents af5c290 + d6f535d commit a9f92a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Requests/UpdateRoleRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function authorize(): bool
*/
public function rules(): array
{
$uniqueRule = 'unique:' . config('fintech.auth.role_model', Role::class) . ',name,' . $this->route('role');
$uniqueRule = 'unique:' . config('fintech.auth.role_model', Role::class) . ',name,' . $this->route('role').',id,deleted_at,NULL';

return [
'name' => ['required', 'string', 'min:5', 'max:255', $uniqueRule],
Expand Down

0 comments on commit a9f92a3

Please sign in to comment.