matiasiglesias/cbu-validator

1.1.3 2022-01-13 22:08 UTC

This package is auto-updated.

Last update: 2024-09-14 04:11:22 UTC


README

Build Status Latest Stable Version Latest Unstable Version Total Downloads License composer.lock available Dependency Status SensioLabsInsight PHP_Eye PHP_Eye

#介绍

阿根廷使用的统一银行密钥验证模块。

更多详细信息请参考 维基百科

##安装

使用 composer 安装模块,在 composer.json 文件中添加以下 require "require":

{
	"require": {
		"matiasiglesias/cbu-validator": "1.*"
	}
}

然后执行

$ php composer.phar update

并在 application.config.php 中启用模块

array(
	'modules' => array(
		'Application',
		'CBUValidator',
		// ...
	),
);

使用

添加验证器

    <?php

        $inputFilter->add($factory->createInput(array(
            'name'     => 'cbu',
            'required' => true,
            'filters'  => array(
                array('name' => 'Digits'), //Filtra los guiones
            ),
            'validators' => array(
                array(
                    'name' => 'CBUValidator\Validator\CBU',
                    'options' => array(
                        'filterNumeric' => true, //Filtra cualquier caracter no numérico del CBU (ej. '-')
                    ),
                ),
            )
        )));

    ?>

配置

以下是验证器的选项

  • filterNumeric 布尔值。过滤 CBU 中的任何非数字字符(例如 '-')。默认值 true

联系

  1. 通过电子邮件 matiasiglesias@matiasiglesias.com.ar
  2. 通过 Twitter @matiashiglesias

许可证

CBUValidator 采用 MIT 许可证。
请参阅包含的 LICENSE 文件。版权所有 (c) 2013-2017 Matias Iglesias

http://www.matiasiglesias.com.ar/
版权所有。