Skip to content

Commit

Permalink
Валидация на проверку уникального названия вложения
Browse files Browse the repository at this point in the history
  • Loading branch information
delaynore committed May 27, 2024
1 parent b05858e commit 0b62f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/AttachmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function store(Request $request, Dictionary $dictionary, Concept $concept
Gate::authorize('must-be-owner', $dictionary);

$validated = $request->validate([
'name' => 'sometimes|required|alpha_num|max:255',
'name' => 'sometimes|required|alpha_num|max:255|unique:attachments,name',
'file' => 'required|mimes:png,jpg,jpeg,mp3,mp4|max:10240',
]);

Expand Down

0 comments on commit 0b62f01

Please sign in to comment.