validate color (#2072)
This commit is contained in:
@@ -11,9 +11,9 @@ namespace App\Entity;
|
||||
|
||||
use App\Constants;
|
||||
use App\Export\Annotation as Exporter;
|
||||
use App\Validator\Constraints as Constraints;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JMS\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
trait ColorTrait
|
||||
{
|
||||
@@ -28,7 +28,7 @@ trait ColorTrait
|
||||
* @Exporter\Expose(label="label.color")
|
||||
*
|
||||
* @ORM\Column(name="color", type="string", length=7, nullable=true)
|
||||
* @Assert\Length(min=4, max=7, allowEmptyString=true)
|
||||
* @Constraints\HexColor()
|
||||
*/
|
||||
private $color = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user