-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13bef8e
commit 942d797
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace WendellAdriel\ValidatedDTO\Tests\Datasets; | ||
|
||
use Illuminate\Http\UploadedFile; | ||
use WendellAdriel\ValidatedDTO\ValidatedDTO; | ||
|
||
class ValidatedFileDTO extends ValidatedDTO | ||
{ | ||
public UploadedFile $file; | ||
|
||
protected function defaults(): array | ||
{ | ||
return []; | ||
} | ||
|
||
protected function casts(): array | ||
{ | ||
return []; | ||
} | ||
|
||
protected function rules(): array | ||
{ | ||
return [ | ||
'file' => 'required|file|mimes:jpg,jpeg,png', | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters