From 578e2a00a29a892a995e6b1a0c306ef10612eb6b Mon Sep 17 00:00:00 2001 From: Manon Bourgognon <manon.bourgognon@epitech.eu> Date: Wed, 24 Feb 2021 19:05:01 +0100 Subject: [PATCH] Add maxlength attribute for textarea --- source/import_documentation/Components/Solid-Form.rst | 5 +++++ source/import_documentation/attributes-list.rst | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/source/import_documentation/Components/Solid-Form.rst b/source/import_documentation/Components/Solid-Form.rst index da988a6..64fb256 100644 --- a/source/import_documentation/Components/Solid-Form.rst +++ b/source/import_documentation/Components/Solid-Form.rst @@ -127,6 +127,11 @@ Attributes If the attribute is defined, each change in an input will trigger a request to update the resource. This attribute works only when editing resources, not creating them. +``maxlength-[field]`` +~~~~~~~~~~~~~~~~~~~~~ + Add this attribute for the field ``[field]`` to define the maximum number of characters that can be typed. + It works only with a ``solid-form-textarea`` widget. + Widgets ------- By default, the widget used is ``<solid-form-label-text>``. Cf the diff --git a/source/import_documentation/attributes-list.rst b/source/import_documentation/attributes-list.rst index 369b60e..59ee4b4 100644 --- a/source/import_documentation/attributes-list.rst +++ b/source/import_documentation/attributes-list.rst @@ -141,6 +141,10 @@ List of attributes (core framework) ``max-[field]`` ~~~~~~~~~~~~~~~ * :ref:`solid-form <solid-form>` + +``maxlength-[field]`` +~~~~~~~~~~~~~~~~~~~~~ + * :ref:`solid-form <solid-form>` ``min-[field]`` ~~~~~~~~~~~~~~~ -- GitLab