validate tag name (#1325)
This commit is contained in:
@@ -40,6 +40,7 @@ class Tag
|
||||
* @ORM\Column(name="name", type="string", length=100, nullable=false)
|
||||
* @Assert\NotBlank()
|
||||
* @Assert\Length(min=2, max=100)
|
||||
* @Assert\Regex(pattern="/,/",match=false,message="Tag name cannot contain comma")
|
||||
*/
|
||||
private $name;
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ class Timesheet implements EntityWithMetaFields, InvoiceItemInterface
|
||||
* @ORM\JoinColumn(name="tag_id", referencedColumnName="id", onDelete="CASCADE")
|
||||
* }
|
||||
* )
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
private $tags;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user