File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -77,8 +77,6 @@ Basic Usage
77
77
Options
78
78
-------
79
79
80
- .. include :: /reference/constraints/_groups-option.rst.inc
81
-
82
80
alpha3
83
81
~~~~~~
84
82
@@ -88,9 +86,11 @@ alpha3
88
86
89
87
**type **: ``boolean `` **default **: ``false ``
90
88
91
- If this option is ``true ``, then the constraint will valid the value as
92
- `ISO 3166-1 alpha-3 `_ three-letter codes (e.g. France = ``FRA ``) instead
93
- of the default `ISO 3166-1 alpha-2 `_ two-letter codes (e.g. France = ``FR ``).
89
+ If this option is ``true ``, the constraint checks that the value is a
90
+ `ISO 3166-1 alpha-3 `_ three-letter code (e.g. France = ``FRA ``) instead
91
+ of the default `ISO 3166-1 alpha-2 `_ two-letter code (e.g. France = ``FR ``).
92
+
93
+ .. include :: /reference/constraints/_groups-option.rst.inc
94
94
95
95
``message ``
96
96
~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ Validates that a value is a valid language *Unicode language identifier*
6
6
7
7
========== ===================================================================
8
8
Applies to :ref: `property or method <validation-property-target >`
9
- Options - `groups `_
9
+ Options - `alpha3 `_
10
+ - `groups `_
10
11
- `message `_
11
12
- `payload `_
12
13
Class :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Language `
@@ -77,6 +78,19 @@ Basic Usage
77
78
Options
78
79
-------
79
80
81
+ alpha3
82
+ ~~~~~~
83
+
84
+ .. versionadded :: 5.1
85
+
86
+ The ``alpha3 `` option was introduced in Symfony 5.1.
87
+
88
+ **type **: ``boolean `` **default **: ``false ``
89
+
90
+ If this option is ``true ``, the constraint checks that the value is a
91
+ `ISO 639-2 `_ three-letter code (e.g. French = ``fra ``) instead of the default
92
+ `ISO 639-1 `_ two-letter code (e.g. French = ``fr ``).
93
+
80
94
.. include :: /reference/constraints/_groups-option.rst.inc
81
95
82
96
``message ``
@@ -95,3 +109,6 @@ Parameter Description
95
109
=============== ==============================================================
96
110
97
111
.. include :: /reference/constraints/_payload-option.rst.inc
112
+
113
+ .. _`ISO 639-1` : https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
114
+ .. _`ISO 639-2` : https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes
You can’t perform that action at this time.
0 commit comments