Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Http/Controllers/Admin/EmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function store(Request $request): RedirectResponse
'recipient_email' => ['required_if:recipient_type,single', 'nullable', 'email', 'max:255'],
'subject' => ['required', 'string', 'max:255'],
'body' => ['required', 'string'],
'image' => ['sometimes', 'nullable', 'image', 'max:5120'],
'image' => ['sometimes', 'nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:5120'],
]);

$subject = $validated['subject'];
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function completeOnboarding(Request $request)
new CleanText,
],
'school' => ['required', 'string', 'max:255', new CleanText],
'image' => ['sometimes', 'nullable', 'image', 'max:5120'],
'image' => ['sometimes', 'nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:5120'],
], [
'school.required' => 'Please enter your school, college, or institution name.',
'username.regex' => 'Username can only contain letters, numbers, and underscores.',
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/Blog/StoreBlogRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function rules(): array
'nullable',
'image',
'mimes:jpg,jpeg,png,webp',
'max:10240',
'max:5120',
],

'is_published' => ['required', 'boolean'],
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/Blog/UpdateBlogRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function rules(): array
'nullable',
'image',
'mimes:jpg,jpeg,png,webp',
'max:10240',
'max:5120',
],

'is_published' => [
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/Notice/UpdateNoticeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function rules(): array
return [
'title' => ['required', 'string', 'max:255'],
'message' => ['required', 'string'],
'image' => ['nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:10240'],
'image' => ['nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:5120'],
'remove_image' => ['nullable', 'boolean'],
'show_button' => ['required', 'boolean'],
'button_title' => ['nullable', 'required_if:show_button,true', 'string', 'max:100'],
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/Profile/UpdateProfileRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function rules(): array
Rule::unique('users', 'username')->ignore($this->user()->id),
new CleanText,
],
'file' => ['sometimes', 'nullable', 'image', 'max:2048'],
'file' => ['sometimes', 'nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:5120'],
'about' => ['sometimes', 'nullable', 'string', 'max:1000', new CleanText],
'institution' => ['sometimes', 'nullable', 'string', 'max:255', new CleanText],
'facebook' => ['sometimes', 'nullable', 'string', 'max:255'],
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/Resource/BulkImageStoreRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function rules(): array
'custom_titles' => 'required|array|max:20',
'custom_titles.*' => 'required|string|max:100',
'files' => 'required|array|min:1|max:20',
'files.*' => 'required|image|max:10240', // 10MB Limit
'files.*' => 'required|image|mimes:jpg,jpeg,png,webp|max:5120',
];
}
}
4 changes: 2 additions & 2 deletions app/Http/Requests/Resource/StoreResourceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function rules(): array
'file' => [
'nullable',
'file',
'max:10000',
'mimes:jpg,jpeg,png',
'max:5120',
'mimes:jpg,jpeg,png,webp',
Rule::requiredIf($this->resource_type === 'image'),
],

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Requests/Resource/UpdateResourceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public function rules(): array
'file' => [
'nullable',
'file',
'max:10000',
'mimes:jpg,jpeg,png',
'max:5120',
'mimes:jpg,jpeg,png,webp',
Rule::requiredIf(
$this->resource_type === 'image'
&& ! $this->route('resource')->file_path
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/User/StoreUserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function rules(): array
'role' => ['nullable', 'string'],
'permissions' => ['nullable', 'array'],
'permissions.*' => ['string', 'exists:permissions,name'],
'file' => ['nullable', 'image', 'max:2048'],
'file' => ['nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:5120'],
'about' => ['nullable', 'string', 'max:1000', new CleanText],
'title' => ['nullable', 'string', 'max:255', new CleanText],
'institution' => ['nullable', 'string', 'max:255', new CleanText],
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/User/UpdateUserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function rules(): array
new CleanText,
],
'email' => ['sometimes', 'email', 'unique:users,email,'.$user->id],
'file' => ['sometimes', 'nullable', 'image', 'max:2048'],
'file' => ['sometimes', 'nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:5120'],
'about' => ['sometimes', 'nullable', 'string', 'max:1000', new CleanText],
'title' => ['sometimes', 'nullable', 'string', 'max:255', new CleanText],
'institution' => ['sometimes', 'nullable', 'string', 'max:255', new CleanText],
Expand Down
Loading