pixelavengers/extra-validator-bundle

此包提供一些有用的额外验证器

dev-master 2012-03-22 20:37 UTC

This package is not auto-updated.

Last update: 2024-09-22 02:47:03 UTC


README

欢迎来到Pixelavengers Extra Validator Bundle。此包提供了一些针对常见网站情况的有用验证器。

当前验证器

全球

  • CreditCard,包括针对以下卡的通用和特定验证器:VisaMastercardAmerican ExpressDiscoverJCBDiners
  • CVV

西班牙

  • ESSeguridadSocial 公共卫生系统标识符
  • ESPhoneNumber,包括移动和固定电话

法国

  • FRSocialSecurity 公共卫生系统标识符(感谢 npotier

Build Status

安装

通过git子模块下载

git submodule add git://github.com/ricardclau/PixelavengersExtraValidatorBundle.git vendor/bundles/Pixelavengers/Bundle/ExtraValidatorBundle

通过编辑deps文件下载

[PixelavengersExtraValidatorBundle]
    git=http://github.com/ricardclau/PixelavengersExtraValidatorBundle.git
    target=/bundles/Pixelavengers/Bundle/ExtraValidatorBundle
    version=origin/master

修改autoload.php并在AppKernel.php中实例化bundle

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

public function registerBundles()
{
    $bundles = array(
        // ...
        new Pixelavengers\Bundle\ExtraValidatorBundle\PixelavengersExtraValidatorBundle(),
    );
}