Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] added alpha3 option to country constraint#12857

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes fromall 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
12 changes: 12 additions & 0 deletionsreference/constraints/Country.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@ Validates that a value is a valid `ISO 3166-1 alpha-2`_ country code.
Applies to :ref:`property or method <validation-property-target>`
Options - `groups`_
- `message`_
- `alpha3`_
Copy link
Contributor

Choose a reason for hiding this comment

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

We should keep an alpha order here

- `payload`_
Class :class:`Symfony\\Component\\Validator\\Constraints\\Country`
Validator :class:`Symfony\\Component\\Validator\\Constraints\\CountryValidator`
Expand DownExpand Up@@ -78,6 +79,15 @@ Options

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

alpha3
~~~~~~

**type**: ``boolean`` **default**: ``false``

If this option is ``true``, then the constraint will valid the value as
`ISO 3166-1 alpha-3`_ three-letter codes (e.g. France = ``FRA``) instead
of the default `ISO 3166-1 alpha-2`_ two-letter codes (e.g. France = ``FR``).

``message``
~~~~~~~~~~~

Expand All@@ -96,3 +106,5 @@ Parameter Description
.. include:: /reference/constraints/_payload-option.rst.inc

.. _`ISO 3166-1 alpha-2`: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
.. _`ISO 3166-1 alpha-3`: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Current_codes


[8]ページ先頭

©2009-2025 Movatter.jp