File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed 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.
7
7
Applies to :ref: `property or method <validation-property-target >`
8
8
Options - `groups `_
9
9
- `message `_
10
+ - `alpha3 `_
10
11
- `payload `_
11
12
Class :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Country `
12
13
Validator :class: `Symfony\\ Component\\ Validator\\ Constraints\\ CountryValidator `
@@ -78,6 +79,15 @@ Options
78
79
79
80
.. include :: /reference/constraints/_groups-option.rst.inc
80
81
82
+ alpha3
83
+ ~~~~~~
84
+
85
+ **type **: ``boolean `` **default **: ``false ``
86
+
87
+ If this option is ``true ``, then the constraint will valid the value as
88
+ `ISO 3166-1 alpha-3 `_ three-letter codes (e.g. France = ``FRA ``) instead
89
+ of the default `ISO 3166-1 alpha-2 `_ two-letter codes (e.g. France = ``FR ``).
90
+
81
91
message
82
92
~~~~~~~
83
93
@@ -96,3 +106,5 @@ Parameter Description
96
106
.. include :: /reference/constraints/_payload-option.rst.inc
97
107
98
108
.. _`ISO 3166-1 alpha-2` : https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
109
+ .. _`ISO 3166-1 alpha-3` : https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Current_codes
110
+
You can’t perform that action at this time.
0 commit comments