-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Validator] Document the "normalizer" option #9433
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
[Validator] Document the "normalizer" option #9433
Conversation
944efb7
to
27d13b3
Compare
reference/constraints/NotBlank.rst
Outdated
|
||
If ``true`` and if the given value is a ``string``, then the :phpfunction:`trim` | ||
PHP function will be used in order to ignore leading and trailing whitespace | ||
characters while checking if it is valid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the NotBlank constraint only have trim
whereas all the others have ltrim
and rtrim
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These options were replaced by the normalizer
option. The patch PR has changed a lot since it's creation so I'm waiting a bit more to update the docs.
reference/constraints/Uuid.rst
Outdated
@@ -117,6 +117,7 @@ The following PHP constants can also be used: | |||
|
|||
All five versions are allowed by default. | |||
|
|||
.. include:: /reference/constraints/_ltrim-rtim-options.rst.inc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in the file name -> should be rtrim
, not rtim
(to be fixed eveywhere :))
This PR does not describe the feature implemented in the related PR anymore, so it needs to be updated. |
…sed validators (renan-taranto) This PR was merged into the 4.3-dev branch. Discussion ---------- [Validator] String normalization options for string-based validators | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #26239 | License | MIT | Doc PR | symfony/symfony-docs#9433 Todo: - [x] Document the new options - [x] Update Doc PR Add trimming options to the string constraints. Commits ------- 708d759b8d [Validator] String normalization options for string-based validators
…sed validators (renan-taranto) This PR was merged into the 4.3-dev branch. Discussion ---------- [Validator] String normalization options for string-based validators | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #26239 | License | MIT | Doc PR | symfony/symfony-docs#9433 Todo: - [x] Document the new options - [x] Update Doc PR Add trimming options to the string constraints. Commits ------- 708d759 [Validator] String normalization options for string-based validators
reference/constraints/Email.rst
Outdated
@@ -144,6 +144,7 @@ If true, then the :phpfunction:`checkdnsrr` PHP function will be used to | |||
check the validity of the MX *or* the A *or* the AAAA record of the host | |||
of the given email. | |||
|
|||
.. include:: /reference/constraints/_ltrim-rtim-options.rst.inc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer 2 files:
/reference/constraints/_ltrim-option.rst.inc
and
/reference/constraints/_rtrim-option.rst.inc
Indeed. I will update it. |
e40e98b
to
6eec07b
Compare
The |
You are right, I removed the label 👍🏻 |
This PR was merged into the master branch. Discussion ---------- [Validator] Document the "normalizer" option Documents the PR symfony/symfony#26484 Commits ------- 6eec07b [Validator] Document the "normalizer" option
Renan, thanks for providing the docs for this feature! Also, congrats on your first Symfony Docs contribution! |
Hi, @javiereguiluz, thanks! I'm glad to contribute to symfony code and docs. |
Documents the PR symfony/symfony#26484