Symfony 5 : display of Assert messages

I have an entity with @Assert on 2 variables :

/**
 * @ORMColumn(type="date")
 * @AssertGreaterThan("today", message ="La dade de début ne devrait pas être antérieure à la date du jour ", class="alert")
 */
private $dateStart;

/**
 * @ORMColumn(type="date")
 * @AssertExpression(
 *     "this.getDateStart() < this.getDateEnd()",
 *     message="La date de fin ne doit pas être antérieure à la date de début"
 * )
 */
private $dateEnd;

The display is not really good looking and I would like to improve it by adding a CSS class. Is it possible to do that with Symfony 5? How?
Thanks for your help !

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *