-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Validator] Add docs for "canonicalize" option at Locale
validation constraint
#9248
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
Conversation
432ed07
to
0761ea9
Compare
Locale
validation constraintLocale
validation constraint
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.
Nice! Thanks for this contribution @phansys (and thanks for implementing the feature too). I left some minor comments.
reference/constraints/Locale.rst
Outdated
**type**: ``boolean`` **default**: ``false`` | ||
|
||
.. versionadded:: 4.1 | ||
Using this option with value `false` was deprecated in Symfony 4.1 and it will |
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.
In this versionadded
directive, the false
and false
code have single backticks but the RST format requires double backticks
reference/constraints/Locale.rst
Outdated
Using this option with value `false` was deprecated in Symfony 4.1 and it will | ||
throw an exception in Symfony 5.0, use `true` instead. | ||
|
||
If true, then the :phpmethod:`Locale::canonicalize` method will be applied to |
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.
If true, then the ...
-> If true, the ...
?
reference/constraints/Locale.rst
Outdated
Using this option with value `false` was deprecated in Symfony 4.1 and it will | ||
throw an exception in Symfony 5.0, use `true` instead. | ||
|
||
If true, then the :phpmethod:`Locale::canonicalize` method will be applied to |
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.
applied to before...
-> applied before...
reference/constraints/Locale.rst
Outdated
throw an exception in Symfony 5.0, use `true` instead. | ||
|
||
If true, then the :phpmethod:`Locale::canonicalize` method will be applied to | ||
before checking the validity of the given locale. |
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.
Let's add a simple example at the end of this phrase for those who don't fully understand what "canonicalize" means or does. Example:
... before checking the validity of the given locale (e.g. ``FR-fr.utf8``
is transformed into ``fr_FR``).
Your comments were addressed, thank you @javiereguiluz! |
Thanks Javier. |
…` validation constraint (phansys, javiereguiluz) This PR was merged into the master branch. Discussion ---------- [Validator] Add docs for "canonicalize" option at `Locale` validation constraint Related to symfony/symfony#22353, symfony/symfony#26075. Closes #7660. Commits ------- 14f10bc Final changes 4c28e1f Minor changes 0cc4ee8 Add docs for "canonicalize" option at `Locale` validation constraint
…n constraint without setting "canonicalize" option to `true` (phansys) This PR was merged into the 4.1-dev branch. Discussion ---------- [Validator] Deprecate use of `Locale` validation constraint without setting "canonicalize" option to `true` |Q |A | |--- |--- | |Branch |master | |Bug fix? |no | |New feature? |no | |BC breaks? |no | |Deprecations?|yes | |Tests pass? |yes | |Fixed tickets|symfony#22353 | |License |MIT | |Doc PR |symfony/symfony-docs#9248| See symfony#22353 (comment). Commits ------- 1572540 Deprecate use of `Locale` validation constraint without setting "canonicalize" option to `true`
Related to symfony/symfony#22353, symfony/symfony#26075.
Closes #7660.