LaravelTest
33 строки · 798.0 Байт
1<?php
2
3namespace App\Http\Requests;
4
5use Illuminate\Foundation\Http\FormRequest;
6
7class UsersUpdateRequest extends FormRequest
8{
9/**
10* Determine if the user is authorized to make this request.
11*/
12public function authorize(): bool
13{
14return true;
15}
16
17/**
18* Get the validation rules that apply to the request.
19*
20* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
21*/
22public function rules(): array
23{
24return [
25'name' => 'required|string',
26'surname' => 'nullable|string',
27'patronimic' => 'nullable|string',
28'age' => 'nullable|integer',
29'address' => 'nullable|string',
30'gender' => 'nullable|integer'
31];
32}
33}