Browse Source

FD3-449 se agrega assert/notnull y notblank.

Maxi Schvindt 7 năm trước cách đây
mục cha
commit
1cd98cfd6f
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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
      *
-     * @ORM\Column(type="string", length=12, nullable=true, unique=true)
+     * @ORM\Column(type="string", length=12, nullable=false, unique=true)
      * 
      * @Gedmo\Versioned
      * 
      * @Assert\Regex(pattern="/^[a-z0-9]+$/")
      * @Assert\Length(min=12, max=12)
+     * @Assert\NotBlank()
+     * @Assert\NotNull
      */
     protected $mac;