Explorar o código

FD3-449 se agrega assert/notnull y notblank.

Maxi Schvindt %!s(int64=7) %!d(string=hai) anos
pai
achega
1cd98cfd6f
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;