<?php
 namespace App\Http\Requests; use App\Models\Client; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rule; class ProfileUpdateRequest extends FormRequest { public function rules(): array { return [ 'name' => ['string', 'max:255'], 'email' => ['email', 'max:255', Rule::unique(Client::class)->ignore($this->user()->id)], 'phone' => ['nullable', 'string', 'max:20'], 'slack_user_id' => ['nullable', 'string', 'max:255'], 'telegram_user_id' => ['nullable', 'string', 'max:255'], 'discord_webhook' => ['nullable', 'url', 'max:500'], 'teams_webhook' => ['nullable', 'url', 'max:2048'], 'pushover_user_key' => ['nullable', 'string', 'max:255'], 'notification_preferences' => ['nullable', 'array'], 'notification_preferences.*' => ['nullable', 'array'], 'notification_preferences.*.*' => ['string', 'in:email,slack,telegram,discord,teams,whatsapp,pushover,sms'], ]; } } 