From 215654571fa07766b4bedfbe5b7d048fc65256c3 Mon Sep 17 00:00:00 2001 From: Johan Desmyter Date: Mon, 6 Jan 2014 21:41:14 +0300 Subject: [PATCH 1/4] add max_length to form field type --- reference/forms/types/form.rst | 2 ++ reference/forms/types/options/max_length.rst.inc | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index 4a99b6e55d8..39d22ccaa0e 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -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 ------------ diff --git a/reference/forms/types/options/max_length.rst.inc b/reference/forms/types/options/max_length.rst.inc index ef0a487e473..a7a06a5bd8b 100644 --- a/reference/forms/types/options/max_length.rst.inc +++ b/reference/forms/types/options/max_length.rst.inc @@ -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. From 391fe30ab6cf226339c5904f1d2ba2264b3e8d69 Mon Sep 17 00:00:00 2001 From: Johan Desmyter Date: Tue, 7 Jan 2014 07:32:29 +0300 Subject: [PATCH 2/4] fix typo in previous commit --- reference/forms/types/options/max_length.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/options/max_length.rst.inc b/reference/forms/types/options/max_length.rst.inc index a7a06a5bd8b..273e5f54dd2 100644 --- a/reference/forms/types/options/max_length.rst.inc +++ b/reference/forms/types/options/max_length.rst.inc @@ -7,4 +7,4 @@ 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. +server-side. From d6800d30bcab36a7c8cdb55b66bb17f4d76a9d46 Mon Sep 17 00:00:00 2001 From: Johan Desmyter Date: Tue, 7 Jan 2014 07:34:01 +0300 Subject: [PATCH 3/4] fix typo in previous commit --- reference/forms/types/options/max_length.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/options/max_length.rst.inc b/reference/forms/types/options/max_length.rst.inc index 273e5f54dd2..ae7b0785128 100644 --- a/reference/forms/types/options/max_length.rst.inc +++ b/reference/forms/types/options/max_length.rst.inc @@ -6,5 +6,5 @@ max_length 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 +This is just a browser validation, so datas must still be validated server-side. From b53a227ae457a16fe4bc9ea0dfddd82fcaa949b4 Mon Sep 17 00:00:00 2001 From: Johan Desmyter Date: Tue, 7 Jan 2014 13:58:21 +0300 Subject: [PATCH 4/4] fix last typo on max length option --- reference/forms/types/options/max_length.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/options/max_length.rst.inc b/reference/forms/types/options/max_length.rst.inc index ae7b0785128..d20d44e1199 100644 --- a/reference/forms/types/options/max_length.rst.inc +++ b/reference/forms/types/options/max_length.rst.inc @@ -6,5 +6,5 @@ max_length 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 +This is just a browser validation, so data must still be validated server-side.