Category: formbuilder

symfony form field’s required (*) flag ignores validation groups

I’m using entity @Assert annotations with different groups tags. /** * @var string * @AssertNotBlank(groups={“basic”}) * @ORMColumn(name=”name”, type=”string”, length=255, nullable=true) */ private $name = null; /** * @var string * @AssertNotBlank(groups={“advanced”}) * @ORMColumn(name=”full_name”, type=”string”, length=255, nullable=true) */ private $fullName =…

Symfony form builder: How to iterate/render dynamic amount of text fields in twig? (Sylius – exta checkout step)

I added an extra checkout step to the Sylius checkout procedure and I am trying to add 1 text field per instance of an ordered item. Thus having put 3x itemA and 1x itemB in cart should spawn 4 text…

Symfony CreateFormBuilder ignores my Entity @AssertLength

I have an entity User, which has $password with @AssertLength(min=6) /** * @var string The hashed password * @ORMColumn(type=”string”) * @AssertLength( min=6, minMessage=”Password is too short (min 6 symbols)” ) */ private $password; I’m trying to generate a Login form…