feat: bootstrap JOBcard CRM foundation

This commit is contained in:
Marco0300
2026-09-01 18:54:47 +02:00
commit 480494c5ed
31 changed files with 1300 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
function validate_client(array $input): array
{
$name = trim((string)($input['name'] ?? ''));
$status = (string)($input['status'] ?? 'active');
$errors = [];
if ($name === '') $errors['name'] = 'Client name is required.';
if (mb_strlen($name) > 190) $errors['name'] = 'Client name must be 190 characters or fewer.';
if (!in_array($status, ['active', 'inactive'], true)) $errors['status'] = 'Invalid client status.';
return ['name' => $name, 'status' => $status, 'errors' => $errors];
}