ldc-legaulois/app/Http/Requests/StoreSubRange.php
2021-09-23 13:38:15 +02:00

37 lines
982 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreSubRange extends FormRequest
{
/**
* 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 [
'name' => 'required|string|min:2|max:28',
'picture' => 'sometimes|image|max:2048|mimes:png,jpg,jpeg|dimensions:height=170,width=170',
'picture_alt' => 'required|string|min:10|max:255',
'title' => 'required|string|min:10|max:255',
'subtitle' => 'required|string|min:10|max:255',
'content' => 'required|string|min:20',
'back_link_url' => 'required|url',
'back_link_text' => 'required|string|min:2|max:20',
];
}
}