2017 © Pedro PelĂĄez
 

library polish-validator-bundle

Symfony bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

image

mikoweb/polish-validator-bundle

Symfony bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

  • Wednesday, December 14, 2016
  • by mikoweb
  • Repository
  • 1 Watchers
  • 0 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 7 Versions
  • 5 % Grown

The README.md

Symfony2 bundle with Polish validators

License Version Build status Scrutinizer Quality Score, (*1)

This is Symfony2 bundle with validators for Polish identification numbers like: PESEL, NIP, REGON., (*2)

Installation

The recommended way to install this library is Composer., (*3)

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version:, (*4)

php composer.phar require kiczort/polish-validator-bundle

Add bundle to AppKernel.php, (*5)

    public function registerBundles()
        {
            $bundles = array(
                ...
                new Kiczort\PolishValidatorBundle\KiczortPolishValidatorBundle(),
                ...
            );

            return $bundles;
        }

Documentation

Example of use PeselValidator:

There are PESEL numbers with errors in real word, so in case of this validator checksum checking is only for strict mode. In case of none strict mode it checks length, used chars and correctness of date of birth., (*6)

...
// src/AppBundle/Entity/Person.php
namespace AppBundle\Entity;

use KiczortPolishValidatorBundle\Validator\Constraints as KiczortAssert;

class Person
{
    /**
     * @KiczortAssert\Pesel(
     *     message = "The '{{ value }}' is not a valid PESEL number.",
     *     strict = true
     * )
     */
     protected $pesel;
}

Example of use NipValidator:

...
// src/AppBundle/Entity/Person.php
namespace AppBundle\Entity;

use KiczortPolishValidatorBundle\Validator\Constraints as KiczortAssert;

class Person
{
    /**
     * @KiczortAssert\Nip
     */
     protected $nip;
}

Example of use RegonValidator:

...
// src/AppBundle/Entity/Company.php
namespace AppBundle\Entity;

use KiczortPolishValidatorBundle\Validator\Constraints as KiczortAssert;

class Company
{
    /**
     * @KiczortAssert\Regon
     */
     protected $regon;
}

Bug tracking

GitHub issues. If you have found bug, please create an issue., (*7)

MIT License

License can be found here., (*8)

The Versions

14/12 2016

dev-master

9999999-dev

Symfony bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Grzegorz KoziƄski

validator symfony bundle pesel regon nip polish validator pl validator symfony validator

14/12 2016

v1.1.1

1.1.1.0

Symfony bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Grzegorz KoziƄski

validator symfony bundle pesel regon nip polish validator pl validator symfony validator

12/12 2016

v1.1.0

1.1.0.0

Symfony bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Grzegorz KoziƄski

validator symfony bundle pesel regon nip polish validator pl validator symfony validator

22/07 2016

v1.0.1

1.0.1.0

Symfony2 bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Grzegorz KoziƄski

validator symfony bundle pesel regon nip polish validator pl validator symfony validator

19/07 2016

dev-scrutinizer-patch-2

dev-scrutinizer-patch-2

Symfony2 bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Grzegorz KoziƄski

validator symfony bundle pesel regon nip polish validator pl validator symfony validator

19/07 2016

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1

Symfony2 bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Grzegorz KoziƄski

validator symfony bundle pesel regon nip polish validator pl validator symfony validator

19/07 2016

v1.0.0

1.0.0.0

Symfony2 bundle with validators for Polish identification numbers: PESEL, NIP, REGON.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Grzegorz KoziƄski

validator symfony bundle pesel regon nip polish validator pl validator symfony validator