1,
'firstname' => 'Arthur',
'lastname' => 'Dent',
'gln' => 7653298712357,
// 'gln' => 7653298712358, // GLN with valid checksum
'email' => 'dear@example.com',
'username' => 'ardente'
]);
// client
$client = new Client([
'id' => 1,
'firstname' => '',
// 'firstname' => 'Ford',
'lastname' => 'Prefect',
'ahv' => 1234,
'birthday' => new Date('12.02.1842'),
'address' => new Address([
'id' => 1,
'street' => '58 Orionis',
'city' => 'Beteigeuze',
'email' => null,
]),
]);
printDMO($owner);
dumpValidationErrors($owner->validate(OwnerValidator::getInstance()));
printDMO($client);
dumpValidationErrors($client->validate(ClientValidator::getInstance()));
function printDMO(DomainObject $dmo, int $level = 1)
{
echo "
"; var_dump($validationResult); echo '