Файловый менеджер - Редактировать - /home/clickysoft/public_html/travel-guru.clickysoft.net/app/Http/Requests/Admin/LiveaboardNonScubaDateCabinStoreRequest.php
Назад
<?php namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; class LiveaboardNonScubaDateCabinStoreRequest 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() { return [ 'name' => 'required', 'status' => 'boolean', 'description' => [ 'required', function ($attribute, $value, $fail) { $strippedText = strip_tags($value); $charCount = mb_strlen($strippedText); if ($charCount < 10 || $charCount > 1500) { $fail("The Description must be between 10 and 1500 characters."); } }, ], 'liveaboard_id' => 'required|exists:liveaboards,id', ]; } public function messages() { return [ 'liveaboard_id.exists' => 'The selected Liveaboard does not exist. Please choose a valid Liveaboard.', 'liveaboard_id.required' => 'The Liveaboard field is required. Please choose a Liveaboard.', ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка