Skip to content

Changed option guessing to maxlength #7273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Changed option guessing to maxlength
HTML attribute for max length is ``maxlength``.
  • Loading branch information
caillioux authored Dec 18, 2016
commit 1f4bc711d5f21c97bf36571cf6e4e56cecdfe895
4 changes: 2 additions & 2 deletions forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR! This change is legit, but I think you should also replace option by html attribute for both this one and required above. since this does not use the options at all, but the attr option, btw max_length option has been deprecated in 2.5.

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).

Expand Down