NETBien.backend/app/Http/Requests/Netbien/SimCardUpdateRequest.php
2025-11-19 16:21:26 -06:00

43 lines
1000 B
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 [
'msisdn' => ['required', 'string', 'max:15', 'unique:sim_cards,msisdn'],
];
}
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.',
];
}
}