From 42282d02fa620724bdb8aad1c0b2fb9398f2235a Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Mon, 25 Mar 2019 21:47:57 +0100 Subject: [PATCH] Update groups.rst Integrating the findings of https://github.com/EasyCorp/EasyAdminBundle/issues/2673#issuecomment-476299467 Please fix the link to [guess your form types] - I don't know how to link to an anchor in the docs! --- validation/groups.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/validation/groups.rst b/validation/groups.rst index 5d9fc1c3b11..10a8d1dadf8 100644 --- a/validation/groups.rst +++ b/validation/groups.rst @@ -185,3 +185,13 @@ will be applied. Of course, you'll usually work with validation indirectly through the form library. For information on how to use validation groups inside forms, see :doc:`/form/validation_groups`. + +.. caution:: + + Using validation groups might lead to unexpected results when rendering your form: + * If you let Symfony [guess your form types](https://symfony.com/doc/3.4/forms.html#field-type-guessing), + *all* constraints will be considered in the form's view (not just the ones of + the active validation groups). + * If you don't let Symfony guess your form types, no constraints will be + considered at all in the form's view. This means that in the form builder, you + have to manually set each field type option you want to have in the form's view.