NETBien.backend/app/Http/Requests/Netbien/SimCardUpdateRequest.php

45 lines
1.1 KiB
PHP

<?php namespace App\Http\Requests\Netbien;
/**
* @copyright (c) 2025 Notsoweb Software (https://notsoweb.com) - All Rights Reserved
*/
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Str;
use Illuminate\Validation\Rule;
/**
* Almacenar rol
*
* @author Moisés Cortés C. <moises.cortes@notsoweb.com>
*
* @version 1.0.0
*/
class SimCardUpdateRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'iccid' => ['sometimes', 'string', 'max:20'],
'msisdn' => ['required', 'string', 'max:11'],
'status' => ['sometimes', 'string', 'in:available,assigned'],
];
}
public function messages() : array
{
return [
'msisdn.required' => 'El campo MSISDN es obligatorio.',
'msisdn.max' => 'El campo MSISDN no debe exceder los 10 caracteres.',
'msisdn.unique' => 'El MSISDN ya está en uso.',
];
}
}