Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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`_ | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe 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` | ||
| @@ -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 | ||
wouterj marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| `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`` | ||
| ~~~~~~~~~~~ | ||
| @@ -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 | ||