Last Updated: September 27, 2021
·
9.819K
· andreia

Symfony2 Forms: Easiest way to add an * to required field labels

By default, required field labels are rendered with the "required" class. To add an asterisk in these labels, just add the following in your stylesheet:

.required:after {
    content: "*";
}

1 Response
Add your response

Thanks a lot! This is so simple and definitely effective.

over 1 year ago ·