From: Kévin Gomez Date: Sun, 18 Oct 2015 12:32:58 +0000 (+0200) Subject: Validate used operators when creating tagging rules X-Git-Tag: 2.0.0-alpha.1~11^2~17 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=c23fc05df86c3cdb8eb40994b98d057f4a81b02d;p=github%2Fwallabag%2Fwallabag.git Validate used operators when creating tagging rules --- diff --git a/src/Wallabag/CoreBundle/Entity/TaggingRule.php b/src/Wallabag/CoreBundle/Entity/TaggingRule.php index 97a29336..472ae582 100644 --- a/src/Wallabag/CoreBundle/Entity/TaggingRule.php +++ b/src/Wallabag/CoreBundle/Entity/TaggingRule.php @@ -28,7 +28,10 @@ class TaggingRule * @var string * * @Assert\NotBlank() - * @RulerZAssert\ValidRule(allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"}) + * @RulerZAssert\ValidRule( + * allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"}, + * allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or"} + * ) * @ORM\Column(name="rule", type="string", nullable=false) */ private $rule;