Files
mgap/app/Http/Requests/UpdateVulnerabilidadRequest.php
T
2026-09-18 23:35:22 -03:00

29 lines
803 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class UpdateVulnerabilidadRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'nombre' => ['required', 'string', 'max:35'],
'descripcion' => ['nullable', 'string', 'max:185'],
'severidad' => ['nullable', 'string', Rule::in(['Baja', 'Media', 'Alta', 'Crítica'])],
'fuente' => ['nullable', 'string', Rule::in(['Interna', 'Externa', 'Ambas'])],
'tipo_vulnerabilidad_id' => ['required', 'exists:tipos_vulnerabilidades,id'],
];
}
}