Skip to content

Commit

Permalink
add max_length to form field type
Browse files Browse the repository at this point in the history
  • Loading branch information
nykopol committed Jan 6, 2014
1 parent 0428c57 commit 2156545
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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 still must be validated
server side.

0 comments on commit 2156545

Please sign in to comment.