8000 [Validator] added BIC validator by mvhirsch · Pull Request #5623 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Validator] added BIC validator #5623

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
[Validator] fixed typos according to notes. refs #5623
  • Loading branch information
mvhirsch committed Aug 14, 2015
commit b69f48dbce2d897dd63149114cdcc31f377905a5
22 changes: 11 additions & 11 deletions reference/constraints/Bic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bic
The Bic constraint was introduced in Symfony 2.8.

This constraint is used to ensure that a value has the proper format of an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] of a [...]

`Business Identifier Code (BIC)`. BIC is an internationally agreed means to
`Business Identifier Code (BIC)`_. BIC is an internationally agreed means to
uniquely identify both financial and non-financial institutions.

+----------------+-----------------------------------------------------------------------+
Expand All @@ -23,14 +23,14 @@ Basic Usage
-----------

To use the Bic validator, simply apply it to a property on an object that
will contain a Business Identifier Code.
will contain a Business Identifier Code (BIC).

.. configuration-block::

.. code-block:: php-annotations

// src/Acme/SubscriptionBundle/Entity/Transaction.php
namespace Acme\SubscriptionBundle\Entity;
// src/Acme/AppBundle/Entity/Transaction.php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Acme part of the namespace and directory should be completely removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the Acme part be removed in all other reference/constraints/*.rst files in 2.8?
Otherwise the Bic.rst would be inconsistent to the rest of the documentation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should update the other parts too.

namespace Acme\AppBundle\Entity;

use Symfony\Component\Validator\Constraints as Assert;

Expand All @@ -46,22 +46,22 @@ will contain a Business Identifier Code.

.. code-block:: yaml

# src/Acme/SubscriptionBundle/Resources/config/validation.yml
Acme\SubscriptionBundle\Entity\Transaction:
# src/Acme/AppBundle/Resources/config/validation.yml
Acme\AppBundle\Entity\Transaction:
properties:
businessIdentifierCode:
- Bic:
message: This is not a valid Business Identifier Code (BIC).

.. code-block:: xml

<!-- src/Acme/SubscriptionBundle/Resources/config/validation.xml -->
<!-- src/Acme/AppBundle/Resources/config/validation.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">

<class name="Acme\SubscriptionBundle\Entity\Transaction">
<class name="Acme\AppBundle\Entity\Transaction">
<property name="businessIdentifierCode">
<constraint name="Bic">
<option name="message">
Expand All @@ -74,8 +74,8 @@ will contain a Business Identifier Code.

.. code-block:: php

// src/Acme/SubscriptionBundle/Entity/Transaction.php
namespace Acme\SubscriptionBundle\Entity;
// src/Acme/AppBundle/Entity/Transaction.php
namespace Acme\AppBundle\Entity;

use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Constraints as Assert;
Expand All @@ -100,7 +100,7 @@ message

**type**: ``string`` **default**: ``This is not a valid Business Identifier Code (BIC).``

The default message supplied when the value does not pass the Bic check.
The default message supplied when the value does not pass the BIC check.

.. include:: /reference/constraints/_payload-option.rst.inc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure why, but this part is not in the 2.8 branch:
https://github.com/symfony/symfony-docs/blob/2.8/reference/constraints/Iban.rst

any idea @javiereguiluz... confused... 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Upwards branch merging" is done from time to time in a non-formal schedule. Sometimes 2.8 and master are behind the other branchs, but at the end our doc managers always merge upwards.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you guys 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OskarStark don't rely on GitHub's reStructuredText rendering. It doesn't support lots of the things that we use.


Expand Down
0