ldc-doux/app/Http/Requests/StorePictoRequest.php
2022-08-11 12:34:27 +02:00

32 lines
686 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StorePictoRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize()
{
return auth()->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'picture' => 'sometimes|image|mimes:png|max:512|dimensions:max_width=150,max_height=150',
'alt_text_picture' => 'required|max:255',
'text' => 'required|max:50',
];
}
}