Skip to content

[Reference][Form Types] Add "max_length" option in form type #3432

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

Merged
merged 4 commits into from
Jan 9, 2014
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
2 changes: 2 additions & 0 deletions reference/forms/types/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ on all fields.

.. include:: /reference/forms/types/options/block_name.rst.inc

.. include:: /reference/forms/types/options/max_length.rst.inc

inherit_data
------------

Expand Down
9 changes: 6 additions & 3 deletions reference/forms/types/options/max_length.rst.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
max_length
~~~~~~~~~~

**type**: ``integer``
**type**: ``integer`` **default**: ``null``

This option is used to add a ``maxlength`` attribute, which is used by
some browsers to limit the amount of text in a field.
If this option is not null, an attribute ``maxlength`` is added, which
is used by some browsers to limit the amount of text in a field.

This is just a browser validation, so datas must still be validated
Copy link
Contributor

Choose a reason for hiding this comment

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

data, not datas :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the last one !?

server-side.