PHPackages                             jschaedl/bav - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. jschaedl/bav

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

jschaedl/bav
============

bankaccount validation

1.5(11y ago)14350.5k↓16.2%2[1 issues](https://github.com/jschaedl/Bav/issues)GNU General Public LicensePHP

Since Dec 12Pushed 9y ago4 watchersCompare

[ Source](https://github.com/jschaedl/Bav)[ Packagist](https://packagist.org/packages/jschaedl/bav)[ Docs](http://github.com/jschaedl/Bav)[ RSS](/packages/jschaedl-bav/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (8)Used By (0)

Bav
===

[](#bav)

A small library for validating german bank account numbers. It provides classes which can be easily integrated into existing projects and is build for PHP 5.3+.

[![Build Status](https://camo.githubusercontent.com/a22e70db179d0d7a4df5f73532e15755b23d1b4811812b160c18d739f7f99735/68747470733a2f2f7472617669732d63692e6f72672f6a7363686165646c2f4261762e706e67)](https://travis-ci.org/jschaedl/Bav)[![Latest Stable Version](https://camo.githubusercontent.com/9f4b49ce043dd879549e344806d5564dc4a117cbfc4be89ab628c2f343c8996d/68747470733a2f2f706f7365722e707567782e6f72672f6a7363686165646c2f6261762f762f737461626c65)](https://packagist.org/packages/jschaedl/bav) [![Total Downloads](https://camo.githubusercontent.com/c4d0a9387b6228a9a9067adf6bf6a16bc993a90ecbef309d2819d9f1a052008a/68747470733a2f2f706f7365722e707567782e6f72672f6a7363686165646c2f6261762f646f776e6c6f616473)](https://packagist.org/packages/jschaedl/bav) [![Latest Unstable Version](https://camo.githubusercontent.com/c05c68fe4a166cd538342a1f35b265cef442d699787ae4403cc820ba01859902/68747470733a2f2f706f7365722e707567782e6f72672f6a7363686165646c2f6261762f762f756e737461626c65)](https://packagist.org/packages/jschaedl/bav) [![License](https://camo.githubusercontent.com/eeb77570d8a4c8e4422d944735f60d7ec267bd6a8c5ae92beee585c9e80ee4dd/68747470733a2f2f706f7365722e707567782e6f72672f6a7363686165646c2f6261762f6c6963656e7365)](https://packagist.org/packages/jschaedl/bav)[![PHP Version](https://camo.githubusercontent.com/3ca7edd1dfd3a02990799e336113188aa5cfd0a61ace5cc1c6246aecff814598/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d504850253230352e332532422d6c69676874677265792e737667)](https://camo.githubusercontent.com/3ca7edd1dfd3a02990799e336113188aa5cfd0a61ace5cc1c6246aecff814598/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d504850253230352e332532422d6c69676874677265792e737667)

Installation
------------

[](#installation)

To install jschaedl/bav install Composer first, if you haven't already

```
curl -sS https://getcomposer.org/installer | php

```

Then just add the following to your composer.json file:

```
// composer.json
{
	"require": {
		"jschaedl/bav": "*"
    }
}
```

Then, you can install the new dependencies by running Composer’s update command from the directory where your `composer.json` file is located:

```
# install
$ php composer.phar install
# update
$ php composer.phar update jschaedl/bav

# or you can simply execute composer command if you set it to
# your PATH environment variable
$ composer install
$ composer update jschaedl/bav
```

You can see this library on [Packagist](https://packagist.org/packages/jschaedl/bav).

Composer installs autoloader at `./vendor/autoload.php`. If you use jschaedl/bav in your php script, add:

```
require_once 'vendor/autoload.php';
```

Or you can use git clone command:

```
# HTTP
$ git clone https://github.com/jschaedl/Bav.git
# SSH
$ git clone git@github.com:jschaedl/Bav.git
```

---

Usage example
-------------

[](#usage-example)

```
use Bav\Backend\Parser\BankDataParser;
use Bav\Backend\BankDataResolver;
use Bav\Encoder\EncoderFactory;

$bankDataFile = 'blz_2013_12_09_txt.txt';

$encoder = EncoderFactory::create(Bav::DEFAULT_ENCODING);

$parser = new BankDataParser($bankDataFile);
$parser->setEncoder($encoder);

$bav = new Bav();
$bav->setBankDataResolver(new BankDataResolver($parser));

$bank = $bav->getBank('20090500');
$agency = $bank->getMainAgency();
$this->assertEquals('netbank', $agency->getName());
$this->assertEquals('000000', $agency->getIbanRule());

$bank = $bav->getBank('58561250');
$this->assertEquals('58564788', $bank->getBankId());

$bank = $bav->getBank('20090500');
$this->assertTrue($bank->isValid('1359100'));
```

---

How to contribute
-----------------

[](#how-to-contribute)

If you want to fix some bugs or want to enhance some functionality, please fork the master branch and create your own development branch. Then fix the bug you found or add your enhancements and make a pull request. Please commit your changes in tiny steps and add a detailed description on every commit.

### Unit Testing

[](#unit-testing)

All pull requests must be accompanied by passing unit tests. This repository uses phpunit and Composer. You must run `composer install` to install this package's dependencies before the unit tests will run. You can run the test via:

```
phpunit -c tests/phpunit.xml tests/

```

---

License and authors
-------------------

[](#license-and-authors)

This project is free and under GPL (see gpl.txt). So do what ever you want. But it would be nice to leave a note about the authors.

The authors of the original project who gave the idea to this project are Björn Wilmsmann and Markus Malkusch.

Responsible for this project is Jan Schädlich.

Requirements
------------

[](#requirements)

You may have:

- PHP 5.3.0 or greater
- mbstring or iconv

BAV works with unicode encoding. Your PHP must have support compiled in to either the mb\_\* or the iconv\_\* functions. If these functions are missing BAV works only with the ISO-8859-15 encoding.

[![Bitdeli Badge](https://camo.githubusercontent.com/99abfe936f10aa3ce763472fb2cd15bcc9726f46852a3d221c137a681ded4fbb/68747470733a2f2f64327765637a68766c38323376302e636c6f756466726f6e742e6e65742f6a7363686165646c2f6261762f7472656e642e706e67)](https://bitdeli.com/free "Bitdeli Badge")

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 88.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~64 days

Total

6

Last Release

4216d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8acaabe0e1615dfef9df61eeb41cba71b3094686eabb0156bb83706f5f8db0a1?d=identicon)[jschaedl](/maintainers/jschaedl)

---

Top Contributors

[![jschaedl](https://avatars.githubusercontent.com/u/1880467?v=4)](https://github.com/jschaedl "jschaedl (92 commits)")[![malkusch](https://avatars.githubusercontent.com/u/1623984?v=4)](https://github.com/malkusch "malkusch (11 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")

---

Tags

validationBankaccountbankaccountbav

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jschaedl-bav/health.svg)

```
[![Health](https://phpackages.com/badges/jschaedl-bav/health.svg)](https://phpackages.com/packages/jschaedl-bav)
```

###  Alternatives

[composer/semver

Version comparison library that offers utilities, version constraint parsing and validation.

3.3k489.6M672](/packages/composer-semver)[giggsey/libphonenumber-for-php

A library for parsing, formatting, storing and validating international phone numbers, a PHP Port of Google's libphonenumber.

5.0k148.7M416](/packages/giggsey-libphonenumber-for-php)[respect/validation

The most awesome validation engine ever created for PHP

5.9k37.4M383](/packages/respect-validation)[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M107](/packages/propaganistas-laravel-phone)[opis/json-schema

Json Schema Validator for PHP

64736.9M186](/packages/opis-json-schema)[giggsey/libphonenumber-for-php-lite

A lite version of giggsey/libphonenumber-for-php, which is a PHP Port of Google's libphonenumber

8912.9M47](/packages/giggsey-libphonenumber-for-php-lite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
