phillarmonic/pixicato-bundle
最新稳定版本:1.0.2
Composer 安装命令:
composer require phillarmonic/pixicato-bundle
包简介
A Symfony bundle for validating Brazilian PIX keys.
README 文档
README
A Symfony bundle for validating Brazilian PIX keys.
Pluck the right key every time :)
Installation
composer require phillarmonic/pixicato-bundle
Usage
Validating a PIX key
use Phillarmonic\PIXicato\PixKey; $pixKey = new PixKey('example@email.com'); if ($pixKey->isValid()) { echo "Valid PIX key of type: " . $pixKey->getType()->value; } else { echo "Invalid PIX key"; } // You can do it in a one-liner too echo (new PixKey('example@example.com'))->isValid() ? 'Valid' : 'Invalid';
Using the Symfony validator
use Phillarmonic\PIXicato\Validator\Constraints as PIXAssert; class User { #[PIXAssert\ValidPixKey( message: 'This is not a valid PIX key.', expectedType: 'email' )] private string $pixKey; // ... }
Supported PIX key types
- CPF
- CNPJ
- Phone number
License
This library is released under the MIT License. See the bundled LICENSE file for details.
统计信息
- 总下载量: 10.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04