diff --git a/forms.rst b/forms.rst index 334c64e4fa7..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:: @@ -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. -``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`` 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).