Closed
Description
Description
It would be useful to be able to apply constraints when "When" expression is not matched, same way as an if/else.
Example
So we could pass from this:
#[Assert\When('this.getProduct()?.getNature()?.value !== "SESSION"', new Assert\IsNull())]
#[Assert\When('this.getProduct()?.getNature()?.value === "SESSION"', new Assert\NotNull())]
To that:
#[Assert\When('this.getProduct()?.getNature()?.value !== "SESSION"', new Assert\IsNull(), new Assert\NotNull())]