Преглед изворни кода

FD3-449 se agrega assert/notnull y notblank.

Maxi Schvindt пре 7 година
родитељ
комит
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
      *
-     * @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;