8000 Add Canonicalize option to Locale Constraint by zairigimad · Pull Request #12984 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Add Canonicalize option to Locale Constraint #12984

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 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions reference/constraints/Locale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Applies to :ref:`property or method <validation-property-target>`
Options - `groups`_
- `message`_
- `payload`_
_ `canonicalize`_
Copy link
Contributor

Choose a reason for hiding this comment

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

@javiereguiluz shall we sort them in alpha order?

Class :class:`Symfony\\Component\\Validator\\Constraints\\Locale`
Validator :class:`Symfony\\Component\\Validator\\Constraints\\LocaleValidator`
========== ===================================================================
Expand Down Expand Up @@ -111,6 +112,12 @@ Parameter Description

.. include:: /reference/constraints/_payload-option.rst.inc

``canonicalize``
~~~~~~~~~~~
**type**: ``boolean`` **default**: ``true``

this method performs Level 1 and Level 2 canonicalization according to ICU standards `ICU format locale IDs`.

.. _`ICU format locale IDs`: http://userguide.icu-project.org/locale
.. _`ISO 639-1`: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
.. _`ISO 3166-1 alpha-2`: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
0