@@ -25,7 +25,7 @@ class LanguageConfigurationFormTypeModel
      *
      * @CoreAssert\LanguageCodeConstraint();
      */
-    public $code;
+    public Language $code;
 
     /**
      * @var bool
<?php

/**
 * Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
 * See license.txt for license details.
 */

declare(strict_types = 1);

namespace Ergonode\Core\Application\Model\Type;

use Ergonode\Core\Domain\ValueObject\Language;
use Ergonode\Core\Infrastructure\Validator\Constraint as CoreAssert;
use Symfony\Component\Validator\Constraints as Assert;

/**
 */
class LanguageConfigurationFormTypeModel
{
    /**
     * @var Language
     *
     * @Assert\NotBlank(message="Lanugage code is required")
     * @Assert\Length(max=2)
     *
     * @CoreAssert\LanguageCodeConstraint();
     */
    public $code;

    /**
     * @var bool
     *
     * @Assert\NotNull(),
     * @Assert\Type("boolean")
     */
    public $active;
}

You need to use ?Language, this field can be null. Symfony form set value on model class before validation. When value is null php 7.4 will throw and error becous of type restriction. Also you need set initial null value in constructor or on property.