namespace Symfony\Component\Validator\Tests\Fixtures\Attribute;
use Symfony\Component\Validator\Constraints
as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Validator\Tests\Fixtures\CallbackClass;
use Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
use Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceB;
#[
ConstraintA,
Assert\
GroupSequence(['Foo', 'Entity'
]),
Assert\
Callback([CallbackClass::
class, 'callback'
]),
]/**
* @Assert\Sequentially({
* @Assert\Expression("this.getFirstName() != null")
* })
*/
class Entity extends EntityParent
implements EntityInterfaceB
{ /**
* @Assert\All({@Assert\NotNull, @Assert\Range(min=3)}),
* @Assert\All(constraints={@Assert\NotNull, @Assert\Range(min=3)})
* @Assert\Collection(fields={
* "foo" = {@Assert\NotNull, @Assert\Range(min=3)},
* "bar" = @Assert\Range(min=5),
* "baz" = @Assert\Required({@Assert\Email()}),
* "qux" = @Assert\Optional({@Assert\NotBlank()})
* }, allowExtraFields=true)
* @Assert\Choice(choices={"A", "B"}, message="Must be one of %choices%")
* @Assert\AtLeastOneOf({@Assert\NotNull, @Assert\Range(min=3)}, message="foo", includeInternalMessages=false)
* @Assert\Sequentially({@Assert\NotBlank, @Assert\Range(min=5)})
*/