Файловый менеджер - Редактировать - /home/clickysoft/public_html/travel-guru.clickysoft.net/app/Http/Requests/Admin/TripDiveOperatorStoreRequest.php
Назад
<?php namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; class TripDiveOperatorStoreRequest 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 [ 'full_name' => 'required', 'email' => 'required|email|unique:users,email', 'user_name' => 'required|unique:user_infos,unique_name', 'short_description' => [ 'required', function ($attribute, $value, $fail) { $strippedText = strip_tags($value); $charCount = mb_strlen($strippedText); if ($charCount < 10 || $charCount > 150) { $fail("The Short Description must be between 10 and 150 characters."); } }, ], 'long_description' => [ 'required', function ($attribute, $value, $fail) { if (!empty($value)) { $strippedText = strip_tags($value); $charCount = mb_strlen($strippedText); if ($charCount < 10 || $charCount > 10000) { $fail("The bio must be between 50 and 10000 characters."); } } }, ], 'phone_number' => 'nullable', 'type' => 'required', 'profile_photo' => 'required|image|mimes:jpeg,png,jpg|max:500000', 'testimonial_name.*' => 'nullable', 'testimonial_description.*' => 'nullable', 'testimonial_file.*' => 'required_with:testimonial_name|image|mimes:jpeg,png,jpg|max:15360', ]; } public function messages() { return [ 'long_description.required' => 'The Bio field is required.', 'testimonial_name.*.required' => 'Testimonial name is required.', 'testimonial_description.*.required' => 'Testimonial description is required.', 'testimonial_file.*.image' => 'Testimonial file must be an image.', 'testimonial_file.*.mimes' => 'Testimonial file must be of type: jpeg, png, jpg, gif.', 'testimonial_file.*.max' => 'Testimonial file size must be less than 2MB.', 'user_name.required' => 'User name is required.', 'user_name.unique' => 'This user name is already taken.', ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка