2017 © Pedro Peláez
 

symfony-bundle polish-extensions-bundle

Symfony2 Bundle for Polish validators: NIP, REGON, PESEL

image

choros/polish-extensions-bundle

Symfony2 Bundle for Polish validators: NIP, REGON, PESEL

  • Tuesday, September 15, 2015
  • by aureox
  • Repository
  • 1 Watchers
  • 0 Stars
  • 72 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

TaveoPolishExtensionsBundle

Symfony2 Bundle for Polish validators: NIP, REGON, PESEL, (*1)

It has validation translations for pl, en, de., (*2)

Installation

Bring in the vendor libraries

This can be done in two different ways:, (*3)

Method #1) Use composer, (*4)

"require": {
    "php": ">=5.3.2",
    "symfony/symfony": "2.1.*",
    "_others": "your other packages",

    "taveo/polish-extensions-bundle": "dev-master",
}

Method #2) Use git submodules, (*5)

git submodule add git://github.com/taveo/TaveoPolishExtensionsBundle.git vendor/bundles/Taveo/PolishExtensionsBundle

Register the Taveo namespace

Only required, when using submodules., (*6)

// app/autoload.php
$loader->registerNamespaces(array(
    'Taveo'  => __DIR__.'/../vendor/bundles',
    // your other namespaces
));

Add PolishExtensionsBundle to your application kernel

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Taveo\PolishExtensionsBundle\TaveoPolishExtensionsBundle(),
        // ...
    );
}

Examples

#1) Annotations, (*7)

<?php
    // src/Acme/DemoBundle/Entity/AcmeEntity.php

    use Taveo\PolishExtensionsBundle\Validator\Constraints as TaveoAssert;

    class AcmeEntity
    {
        // ...

        /**
         * @TaveoAssert\NIP
         */
        protected $nip;

        /**
         * @TaveoAssert\PESEL
         */
        protected $pesel;

        /**
         * @TaveoAssert\REGON
         */
        protected $regon;

        // ...

    }


#2) YAML ``` yaml, (*8)

src/Acme/DemoBundle/Resources/config/validation.yml

Acme\DemoBundle\Entity\AcmeEntity: properties: nip: - Taveo\PolishExtensionsBundle\Validator\Constraints\NIP: ~ pesel: - Taveo\PolishExtensionsBundle\Validator\Constraints\PESEL: ~ regon: - Taveo\PolishExtensionsBundle\Validator\Constraints\REGON: ~ ```, (*9)

The Versions

15/09 2015

dev-master

9999999-dev http://github.com/taveo/TaveoPolishExtensionsBundle

Symfony2 Bundle for Polish validators: NIP, REGON, PESEL

  Sources   Download

MIT

The Requires

 

symfony2 bundle pesel regon nip taveo polish

08/08 2012

0.3

0.3.0.0 http://github.com/taveo/TaveoPolishExtensionsBundle

Symfony2 Bundle for Polish validators: NIP, REGON, PESEL

  Sources   Download

MIT

The Requires

 

symfony2 bundle pesel regon nip taveo polish

05/08 2012

0.2

0.2.0.0 http://github.com/taveo/TaveoPolishExtensionsBundle

Symfony2 Bundle for Polish validators: NIP, REGON, PESEL

  Sources   Download

MIT

The Requires

 

symfony2 bundle pesel regon nip taveo polish

03/08 2012

0.1

0.1.0.0 http://github.com/taveo/TaveoPolishExtensionsBundle

Symfony2 Bundle for Polish validators: NIP, REGON, PESEL

  Sources   Download

MIT

The Requires

 

symfony2 bundle pesel regon nip taveo polish