mirror of
https://gitlab.com/DanLegoff/mgap.git
synced 2026-11-16 14:22:37 +00:00
29 lines
803 B
PHP
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'],
|
|
];
|
|
}
|
|
}
|