-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Description
Symfony version(s) affected: 5.1.8
Description
The pattern attribute is only allowed on the following input types.
- text
- tel
- url
- password
- search
How to reproduce
Define Lenth
contstraint on some entity property
/**
* @ORM\Column(type="text")
* @Assert\NotBlank()
* @Assert\Length(min="150")
*/
private string $description;
Check out markup of rendered entity form. It'll look something like this.
<textarea id="company_description" name="company[description]" required="required" pattern=".{150,}" aria-describedby="company_description_help" class="form-control"></textarea>
Additional context
For textareas it looks like a regression because it was fixed long tiime ago (#2676) and even got a test (38f64a1).