jongotlin/identity-number-bundle
最新稳定版本:2.0.0
Composer 安装命令:
composer require jongotlin/identity-number-bundle
包简介
README 文档
README
This Symfony Bundle uses github.com/byrokrat/id to validate swedish identity number (personnummer), coordination number (samordningsnummer) and organization number (organisationsnummer).
Install
Via Composer
$ 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
allowCoordinationNumberWhen set to true coordination number (samordningsnummer) is accepted. Default is false.allowPersonalIdNumberWhen set to true personal identity number is accepted as organization number. Default is false.strictWhen 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.
统计信息
- 总下载量: 23.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-30