承接 nembie/iban-rule 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nembie/iban-rule

最新稳定版本:1.0.3

Composer 安装命令:

composer require nembie/iban-rule

包简介

A Laravel validation rule to validate IBAN numbers

README 文档

README

GitHub GitHub issues Packagist Downloads GitHub Release

This package provides a custom validation rule for Laravel to validate International Bank Account Numbers (IBANs). It uses the validation rules defined by the Single Euro Payments Area (SEPA) and other non-SEPA countries to ensure that the given IBAN is valid.

🧰 Requirements

  • PHP >= 8.1
  • Laravel >= 10

⚙️ Installation

You can install this package using Composer:

composer require nembie/iban-rule

👾 Usage

To use the IBAN validation rule, simply add it to your Laravel validation rules. Here's an example:

use Illuminate\Http\Request;
use Nembie\IbanRule\ValidIban;


public function store(Request $request)
{
    $request->validate([
        'iban' => ['required', new ValidIban()],
    ]);

    // The rest of your code
}

👽 Customize error message

You can use your own validation message (by default will be The :attribute is not a valid IBAN.).

⚠️ If you don't have these folders use php artisan lang:publish

Simply:

# Path
\main_folder_project
    \lang
        \app_language(ex.'en')
            validation.php

# Add 'iban' key
<?php
    // validation.php inside 'it' folder

    'iban' => 'IBAN non valido.'


# Now you're validation message will be translated!

🔐 Validation Rules

This package uses the validation rules defined by the Single Euro Payments Area (SEPA) and other non-SEPA countries to ensure that the given IBAN is valid. The validation rules are loaded from a countries.json file that is included in this package.

🤝 Contribution

If you find any issues or have suggestions for improvements, feel free to open a pull request or issue. Your contribution is highly appreciated.

🌍 Supported countries

Full list of supported countries

🔨 Test

composer test

📝 License

This package is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-12