Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged

Conversation

renan-taranto
Copy link
Contributor

@renan-taranto renan-taranto commented Mar 13, 2018

Documents the PR symfony/symfony#26484

@renan-taranto renan-taranto force-pushed the string_normalization_options branch from 944efb7 to 27d13b3 Compare March 13, 2018 22:54
@javiereguiluz javiereguiluz added the Waiting Code Merge Docs for features pending to be merged label Mar 14, 2018
@renan-taranto renan-taranto changed the title [Validator] Update NotBlank and Length validators pages with the new … [Validator] Update string constraints pages with the new trimming options Jun 26, 2018
@renan-taranto renan-taranto changed the title [Validator] Update string constraints pages with the new trimming options [WIP][Validator] Update string constraints pages with the new trimming options Jun 26, 2018
@renan-taranto renan-taranto changed the title [WIP][Validator] Update string constraints pages with the new trimming options [Validator] Update string constraints pages with the new trimming options Jun 26, 2018

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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@@ -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
Copy link
Member

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 :))

@fabpot
Copy link
Member

fabpot commented Mar 31, 2019

This PR does not describe the feature implemented in the related PR anymore, so it needs to be updated.

symfony-splitter pushed a commit to symfony/validator that referenced this pull request Mar 31, 2019
…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
fabpot added a commit to symfony/symfony that referenced this pull request Mar 31, 2019
…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
@@ -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
Copy link
Contributor

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

@renan-taranto
Copy link
Contributor Author

This PR does not describe the feature implemented in the related PR anymore, so it needs to be updated.

Indeed. I will update it.

@renan-taranto renan-taranto force-pushed the string_normalization_options branch from e40e98b to 6eec07b Compare April 3, 2019 01:25
@renan-taranto renan-taranto changed the title [Validator] Update string constraints pages with the new trimming options [Validator] Document the "normalizer" option Apr 3, 2019
@renan-taranto
Copy link
Contributor Author

The Waiting Code Merge label should be removed since the code PR was already merged.

@OskarStark OskarStark removed the Waiting Code Merge Docs for features pending to be merged label Apr 3, 2019
@OskarStark
Copy link
Contributor

You are right, I removed the label 👍🏻

@javiereguiluz javiereguiluz added this to the 4.3 milestone Apr 24, 2019
@javiereguiluz javiereguiluz merged commit 6eec07b into symfony:master Apr 24, 2019
javiereguiluz added a commit that referenced this pull request Apr 24, 2019
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
@javiereguiluz
Copy link
Member

Renan, thanks for providing the docs for this feature! Also, congrats on your first Symfony Docs contribution!

@renan-taranto
Copy link
Contributor Author

renan-taranto commented Apr 24, 2019

Hi, @javiereguiluz, thanks! I'm glad to contribute to symfony code and docs.

@renan-taranto renan-taranto deleted the string_normalization_options branch April 24, 2019 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants