From 44aaa9e1151d69098b0f71cc589ff6a44d722451 Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Sat, 16 Feb 2019 21:07:07 +0100 Subject: [PATCH] Document allowLowerCase allowSpaces options --- reference/constraints/Bic.rst | 18 ++++++++++++++++++ reference/constraints/Iban.rst | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/reference/constraints/Bic.rst b/reference/constraints/Bic.rst index 396c4745999..c037332b783 100644 --- a/reference/constraints/Bic.rst +++ b/reference/constraints/Bic.rst @@ -14,6 +14,8 @@ check that the BIC is associated with a given IBAN. | | - `iban`_ | | | - `ibanMessage`_ | | | - `ibanPropertyPath`_ | +| | - `allowLowerCase`_ | +| | - `allowSpaces`_ | +----------------+-----------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Validator\\Constraints\\Bic` | +----------------+-----------------------------------------------------------------------+ @@ -131,4 +133,20 @@ For example, if you want to compare the ``$bic`` property of some object with regard to the ``$iban`` property of the same object, use ``propertyPath="iban"`` in the comparison constraint of ``$bic``. +allowLowerCase +~~~~~~~~~~~~~~~~ + +**type**: ``boolean`` **default**: false + +If this option is set to ``false`` and value contains a lower letter, a validation +error will be returned. + +allowSpaces +~~~~~~~~~~~~~~~~ + +**type**: ``boolean`` **default**: true + +If this option is set to ``false`` and value contains a space, a validation +error will be returned. + .. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code diff --git a/reference/constraints/Iban.rst b/reference/constraints/Iban.rst index bbc0c63794e..093499f553e 100644 --- a/reference/constraints/Iban.rst +++ b/reference/constraints/Iban.rst @@ -11,6 +11,8 @@ borders with a reduced risk of propagating transcription errors. +----------------+-----------------------------------------------------------------------+ | Options | - `message`_ | | | - `payload`_ | +| | - `allowLowerCase`_ | +| | - `allowSpaces`_ | +----------------+-----------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Validator\\Constraints\\Iban` | +----------------+-----------------------------------------------------------------------+ @@ -110,6 +112,22 @@ You can use the following parameters in this message: | ``{{ value }}`` | The current (invalid) value | +-----------------+-----------------------------+ +allowLowerCase +~~~~~~~~~~~~~~~~ + +**type**: ``boolean`` **default**: true + +If this option is set to ``false`` and value contains a lower letter, a validation +error will be returned. + +allowSpaces +~~~~~~~~~~~~~~~~ + +**type**: ``boolean`` **default**: true + +If this option is set to ``false`` and value contains a space, a validation +error will be returned. + .. include:: /reference/constraints/_payload-option.rst.inc .. _`International Bank Account Number (IBAN)`: https://en.wikipedia.org/wiki/International_Bank_Account_Number