From 912a217e4ef9b3b65b0c055a4af59f0a23f1ffad Mon Sep 17 00:00:00 2001 From: "maxime.perrimond" Date: Fri, 27 Dec 2019 15:24:13 +0900 Subject: [PATCH] [Validator] added alpha3 option to country constraint --- reference/constraints/Country.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reference/constraints/Country.rst b/reference/constraints/Country.rst index 4582a930cad..1dacfbae4c4 100644 --- a/reference/constraints/Country.rst +++ b/reference/constraints/Country.rst @@ -7,6 +7,7 @@ Validates that a value is a valid `ISO 3166-1 alpha-2`_ country code. Applies to :ref:`property or method ` Options - `groups`_ - `message`_ + - `alpha3`_ - `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 +`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 + pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy