File manager - Edit - /var/www/html/spdc/api/app/Http/Requests/OccurrencyScriptureInterdictionRequest.php
Back
<?php namespace App\Http\Requests; use App\Enums\BanType; use App\Rules\ArrayInput; use App\Enums\ImplementationType; use Illuminate\Foundation\Http\FormRequest; class OccurrencyScriptureInterdictionRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, mixed> */ public function rules() { $rules = [ 'note' => ['nullable', 'max:255'], 'place_type_id' => ['required', 'exists:place_types,id'], 'publication' => ['nullable', 'max:255'], 'page' => ['nullable', 'max:255'], 'year' => ['nullable', 'max:255'], 'ban_type' => ['required', 'in:' . implode(",", getEnumValuesToArray(BanType::cases()))], 'area' => ['nullable', 'max:255'], 'implementation_type' => ['required', 'in:' . implode(",", getEnumValuesToArray(ImplementationType::cases()))], 'family_composition' => ['nullable', new ArrayInput], 'family_composition.*.name' => ['required', 'max:255'], 'family_composition.*.age' => ['required', 'max:3'], ]; return $rules; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings