-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Closed
Copy link
Labels
Description
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