In this short two part tutorial series you will learn how easy it is to extract complex or repeated logic from your Symfony Twig templates, and create Twig Extension functions to keep your templates DRY.
This is one possible solution to a question I was asked:
How can I add a custom CSS class to the
input
/ other form field when validation fails for that field?
If you'd like to see the full tutorial then please visit: