Skip to content

Trim default is false in password field #5061

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 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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: 1 addition & 1 deletion reference/forms/types/options/trim.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ trim
**type**: ``Boolean`` **default**: ``true``

If true, the whitespace of the submitted string value will be stripped
via the ``trim()`` function when the data is bound. This guarantees that
via the :phpfunction:`trim` function when the data is bound. This guarantees that
if a value is submitted with extra whitespace, it will be removed before
the value is merged back onto the underlying object.
10 changes: 9 additions & 1 deletion reference/forms/types/password.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,12 @@ The default value is ``''`` (the empty string).

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

.. include:: /reference/forms/types/options/trim.rst.inc
trim
~~~~

**type**: ``Boolean`` **default**: ``false``
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add a blank line before and after this line and change Boolean to bool?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the blank lines but I prefer to let Boolean rather than bool for the moment as all the others references in the documentation use Boolean.


If true, the whitespace of the submitted string value will be stripped
via the :phpfunction:`trim` function when the data is bound. This guarantees that
if a value is submitted with extra whitespace, it will be removed before
the value is merged back onto the underlying object.
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be "merged back into the underlying object"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I duplicated the text from the underlying object because the default trim option is "true" for the different form fields (except for the password field type where its overloaded to "false").