From 8e41b9806b2296c5385a131d9185af91ceb42544 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 19 Sep 2018 13:25:28 +0200 Subject: [PATCH] Use cross references for internal links --- best_practices/forms.rst | 10 ++++------ reference/forms/types/form.rst | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/best_practices/forms.rst b/best_practices/forms.rst index f43cc32b57b..9bf7cb25b5c 100644 --- a/best_practices/forms.rst +++ b/best_practices/forms.rst @@ -148,9 +148,10 @@ view layer: Validation ---------- -The `constraints`_ option allows you to attach `validation constraints`_ to any -form field. However, doing that prevents the validation from being reused in -other forms or other places where the mapped object is used. +The :ref:`constraints ` option allows you to +attach :doc:`validation constraints ` to any form field. +However, doing that prevents the validation from being reused in other forms or +other places where the mapped object is used. .. best-practice:: @@ -235,6 +236,3 @@ like the form is *always* processed (even on the GET request). ---- Next: :doc:`/best_practices/i18n` - -.. _`constraints`: https://symfony.com/doc/current/reference/forms/types/form.html#constraints -.. _`validation constraints`: https://symfony.com/doc/current/reference/constraints.html diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index b571840d5de..fe6b80f1ca9 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -73,6 +73,8 @@ option on the form. .. include:: /reference/forms/types/options/compound.rst.inc +.. _reference-form-option-constraints: + .. include:: /reference/forms/types/options/constraints.rst.inc .. include:: /reference/forms/types/options/data.rst.inc