Просмотр исходного кода

FD3-449 se agrega assert/notnull y notblank.

Maxi Schvindt 7 лет назад
Родитель
Сommit
1cd98cfd6f
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/CablemodemBundle/Entity/Cablemodem.php

+ 3 - 1
src/CablemodemBundle/Entity/Cablemodem.php

@@ -57,12 +57,14 @@ class Cablemodem implements DeviceInterface, TenancyIdTraitInterface, LocationIn
     /**
     /**
      * @var string $mac
      * @var string $mac
      *
      *
-     * @ORM\Column(type="string", length=12, nullable=true, unique=true)
+     * @ORM\Column(type="string", length=12, nullable=false, unique=true)
      * 
      * 
      * @Gedmo\Versioned
      * @Gedmo\Versioned
      * 
      * 
      * @Assert\Regex(pattern="/^[a-z0-9]+$/")
      * @Assert\Regex(pattern="/^[a-z0-9]+$/")
      * @Assert\Length(min=12, max=12)
      * @Assert\Length(min=12, max=12)
+     * @Assert\NotBlank()
+     * @Assert\NotNull
      */
      */
     protected $mac;
     protected $mac;