8000 Reworded the code comments · symfony/symfony-docs@cf355c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf355c9

Browse files
Reworded the code comments
1 parent 423bfae commit cf355c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

reference/forms/twig_reference.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ This test will check if the current ``form`` does not have a parent form view.
226226

227227
.. code-block:: twig
228228
229-
{# DON'T DO THIS: this code will fail when the form doesn't have a parent
230-
but it defines a normal form field called 'parent' #}
229+
{# DON'T DO THIS: this simple check can't differentiate between a form having
230+
a parent form view and a form defining a normal form field called 'parent' #}
231231
232232
{% if form.parent is null %}
233233
{{ form_errors(form) }}
234234
{% endif %}
235235
236-
{# DO THIS: this code will always work, regardless of the form field names #}
236+
{# DO THIS: this check is always reliable, even if the form defines a field called 'parent' #}
237237
238238
{% if form is rootform %}
239239
{{ form_errors(form) }}

0 commit comments

Comments
 (0)
0