Files
star-cloud/app/Http/Requests/ProfileUpdateRequest.php
sky121113 c30c3a399d
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 36s
feat: 實作機台日誌核心功能與 IoT 高併發處理架構
2026-03-09 09:43:51 +08:00

26 lines
738 B
PHP

<?php
namespace App\Http\Requests;
use App\Models\System\User;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class ProfileUpdateRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)],
'phone' => ['nullable', 'string', 'max:20'],
'avatar' => ['nullable', 'string', 'max:255'],
];
}
}