square-bit/laravel-pt-rules 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

square-bit/laravel-pt-rules

最新稳定版本:v1.4.2

Composer 安装命令:

composer require square-bit/laravel-pt-rules

包简介

Validation rules relevant to Portugal

README 文档

README

Latest Stable Version License Total Downloads

This package provides a set of Rules for Laravel 8 that are mainly useful to validate Portuguese ... stuff .... such as NIFs and CCs.

Installation

Via Composer

$ composer require square-bit/laravel-pt-rules

Usage

Just like any other validation rule, simply add the desired class to the list of rules. Example:

return Validator::make($data, [
    [...]
    'nif' => ['required', new NIF()],
    [...]
]);

Available rules

Class Description
NIF Checks if the input is a valid Portuguese Fiscal ID number. Accepts both with and without the country preffix, ex: '123456789' or 'PT123456789'
CompanyNIF Checks if the input is a valid Portuguese Fiscal ID number for a company (i.e. it starts with 5 or 9). Accepts both with and without the country preffix, ex: '523456789' or 'PT523456789'
BI Checks if the input is a valid Portuguese Identification Card number. (requires the entire number, including the last digit)
CC Checks if the input is a valid Portuguese Citizen Card number. (requires the full number, ex: "12233456 7 ZZ0")

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email info@square-bit.com instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.

统计信息

  • 总下载量: 2.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-06