44 lines
1.1 KiB
PHP
44 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 [
|
|
'msisdn' => ['required', 'string', 'max:10', 'unique:sim_cards,msisdn'],
|
|
];
|
|
}
|
|
|
|
public function messages() : array
|
|
{
|
|
return [
|
|
'msisdn.required' => 'El campo MSISDN es obligatorio.',
|
|
'msisdn.string' => 'El campo MSISDN debe ser una cadena de texto.',
|
|
'msisdn.max' => 'El campo MSISDN no debe exceder los 10 caracteres.',
|
|
'msisdn.unique' => 'El MSISDN ya está en uso.',
|
|
];
|
|
}
|
|
}
|