From 59748ecc2283ecc9e8bbaabef632f91f6fdba9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 25 Aug 2019 13:14:30 +0200 Subject: [PATCH] Show validation errors in SIUnitType --- src/Form/Type/SIUnitType.php | 1 + templates/Form/extendedBootstrap4_layout.html.twig | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Form/Type/SIUnitType.php b/src/Form/Type/SIUnitType.php index 63010110..608e8fa7 100644 --- a/src/Form/Type/SIUnitType.php +++ b/src/Form/Type/SIUnitType.php @@ -57,6 +57,7 @@ class SIUnitType extends AbstractType implements DataMapperInterface $resolver->setDefaults([ 'show_prefix' => true, 'is_integer' => false, + 'error_mapping' => [ '.' => 'value'] ]); $resolver->setRequired('unit'); diff --git a/templates/Form/extendedBootstrap4_layout.html.twig b/templates/Form/extendedBootstrap4_layout.html.twig index 6a1e6a22..4f70adf0 100644 --- a/templates/Form/extendedBootstrap4_layout.html.twig +++ b/templates/Form/extendedBootstrap4_layout.html.twig @@ -43,4 +43,5 @@ {% endif %} + {{ form_errors(form.value) }} {% endblock %} \ No newline at end of file