Hello,
I have a problem with guessing maxlength attribute if field definition has attr option. Please see below:
$builder
->add(
'title',
null,
[
'attr' =>
[
'autocomplete' => 'off',
'data-display' => true,
],
]
);
.......
/**
* Title
*
* @var string
*
* @ORM\Column(type="string", length=255, nullable=false)
* @Assert\NotNull(groups={})
* @Assert\Length(max=255, groups={})
*/
private $title;
In this case I don't see maxlength attribute in html output, but if I declare field like this (without attr option):
$builder
->add(
'title',
null,
[
]
);
maxlength attribute appears in html output.
Could you please clarify this behavior.
Thanks in advance
Hello,
I have a problem with guessing
maxlengthattribute if field definition hasattroption. Please see below:In this case I don't see
maxlengthattribute in html output, but if I declare field like this (withoutattroption):maxlengthattribute appears in html output.Could you please clarify this behavior.
Thanks in advance