- add send CV status

This commit is contained in:
2023-08-04 16:25:09 +02:00
parent 6a033d108c
commit 2a2869e2c6
10 changed files with 104 additions and 11 deletions

View File

@@ -19,6 +19,19 @@ class CVRequest extends FormRequest
'rodo' => 'nullable|string',
'position' => 'nullable|string',
'notes' => 'nullable|string',
'sended' => 'nullable|boolean',
];
}
protected function prepareForValidation(): void
{
$this->merge([
'sended' => $this->toBoolean($this->sended),
]);
}
private function toBoolean($booleable): bool
{
return filter_var($booleable, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
}
}

View File

@@ -23,7 +23,7 @@ class ProjectRequest extends FormRequest
'project_url' => 'nullable|string',
'project_version' => 'nullable|string',
'description' => 'nullable|string',
'description' => 'required|string|min:3',
'visible' => 'required|boolean'
];
}