ldc-doux/app/Http/Requests/UpdatePictoRequest.php

33 lines
684 B
PHP
Raw Normal View History

2022-05-12 16:03:40 +02:00
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
2022-07-18 10:36:38 +00:00
class UpdatePictoRequest extends FormRequest
2022-05-12 16:03:40 +02:00
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return auth()->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
2022-07-18 10:36:38 +00:00
'picture' => 'sometimes|image|mimes:png|max:512|dimensions:max_width=150,max_height=150',
'alt_text_picture' => 'required|max:255',
'text' => 'required|max:50',
2022-05-12 16:03:40 +02:00
];
}
}