%PDF- %PDF-
| Direktori : /www/loslex_o/production/app/Http/Requests/ |
| Current File : /www/loslex_o/production/app/Http/Requests/RangeUpdateRequest.php |
<?php
namespace App\Http\Requests;
use App\Models\User;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class RangeUpdateRequest 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',
'is_active' => 'sometimes|accepted',
'web' => 'nullable|url',
'location' => ['nullable', 'string', 'regex:/^\d+\.\d+, \d+\.\d+$/'],
'region' => 'integer',
'address' => 'nullable|string|max:255',
'note' => 'nullable|string|max:1024',
'email' => 'nullable|string|email|max:255',
'phone' => ['nullable','string','regex:/^(\+42[01] ?)?\d{3} ?\d{3} ?\d{3}$/'],
];
}
}