From 1f4bc711d5f21c97bf36571cf6e4e56cecdfe895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= Date: Sun, 18 Dec 2016 15:35:55 +0100 Subject: [PATCH 1/3] Changed option guessing to maxlength HTML attribute for max length is ``maxlength``. --- forms.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forms.rst b/forms.rst index 334c64e4fa7..d74ae4800e4 100644 --- a/forms.rst +++ b/forms.rst @@ -562,8 +562,8 @@ the correct values of a number of field options. field ``nullable``). This is very useful, as your client-side validation will automatically match your validation rules. -``max_length`` - If the field is some sort of text field, then the ``max_length`` option can be +``maxlength`` + If the field is some sort of text field, then the ``maxlength`` option can be guessed from the validation constraints (if ``Length`` or ``Range`` is used) or from the Doctrine metadata (via the field's length). From b0113fc546b8a947bb17ec70f7ec445230553fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= Date: Sun, 18 Dec 2016 21:20:15 +0100 Subject: [PATCH 2/3] Replaced "option" word with "html attribute" --- forms.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forms.rst b/forms.rst index d74ae4800e4..40653b656c9 100644 --- a/forms.rst +++ b/forms.rst @@ -557,13 +557,13 @@ the correct values of a number of field options. field type options can then be guessed from that information. ``required`` - The ``required`` option can be guessed based on the validation rules (i.e. is + The ``required`` html attribute can be guessed based on the validation rules (i.e. is the field ``NotBlank`` or ``NotNull``) or the Doctrine metadata (i.e. is the field ``nullable``). This is very useful, as your client-side validation will automatically match your validation rules. ``maxlength`` - If the field is some sort of text field, then the ``maxlength`` option can be + If the field is some sort of text field, then the ``maxlength`` html attribute can be guessed from the validation constraints (if ``Length`` or ``Range`` is used) or from the Doctrine metadata (via the field's length). From 52abda102b2e0e11b9fe686d3a677638d3ab49f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= Date: Sun, 18 Dec 2016 21:33:51 +0100 Subject: [PATCH 3/3] Changed section title --- forms.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forms.rst b/forms.rst index 40653b656c9..329fcfeee72 100644 --- a/forms.rst +++ b/forms.rst @@ -542,11 +542,11 @@ the guessed field. .. index:: single: Forms; Field type guessing -Field Type Options Guessing +Field Attributes Guessing ~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition to guessing the "type" for a field, Symfony can also try to guess -the correct values of a number of field options. +the correct values of a number of field attributes. .. tip::