2017 © Pedro Peláez
 

symfony-bundle identity-number-bundle

image

jongotlin/identity-number-bundle

  • Tuesday, February 20, 2018
  • by jongotlin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 601 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 16 % Grown

The README.md

IdentityNumberValidatorBundle

Build Status, (*1)

This Symfony Bundle uses github.com/byrokrat/id to validate swedish identity number (personnummer), coordination number (samordningsnummer) and organization number (organisationsnummer)., (*2)

Install

Via Composer, (*3)

$ composer require jongotlin/identity-number-bundle
class AppKernel extends Kernel
{
  public function registerBundles()
  {
    $bundles = array(
        // ...
        new JGI\IdentityNumberValidatorBundle\IdentityNumberValidatorBundle(),
    }
  }
}

Usage

use JGI\IdentityNumberValidatorBundle\Validator\Constraints as IdentityNumberAssert;

/**
 * @IdentityNumberAssert\IdentityNumber(allowCoordinationNumber=true)
 */
private $identityNumber;

/**
 * @IdentityNumberAssert\OrganizationNumber(allowPersonalIdNumber=true, allowCoordinationNumber=true)
 */
private $organizationNumber;

Available options are - allowCoordinationNumber When set to true coordination number (samordningsnummer) is accepted. Default is false. - allowPersonalIdNumber When set to true personal identity number is accepted as organization number. Default is false. - strict When set to true identity number must be exactly 12 digits and organization number 10 digits. No hyphen is accepted. If false identity number can be either 10 or 12 digits and with or without hyphen (or plus sign). Default is false., (*4)

The Versions

20/02 2018
20/02 2018

dev-create-id-method

dev-create-id-method

  Sources   Download

MIT

The Requires

 

The Development Requires

30/11 2017