PHPackages                             ruudvdd/ogm - 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. ruudvdd/ogm

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

ruudvdd/ogm
===========

Package to validate and generate Belgian OGMs

0.2.0(9y ago)214.0k↓53.8%MITPHPPHP &gt;=5.6

Since Jun 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ruudvdd/ogm)[ Packagist](https://packagist.org/packages/ruudvdd/ogm)[ RSS](/packages/ruudvdd-ogm/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

OGM
===

[](#ogm)

Library to generate and validate Belgian OGM's.

An OGM is a Belgian format used to automatically identify payments. The typical structure of an OGM is `+++090/9337/55493+++` or `***090/9337/55493***`. In total the OGM contains 12 digits. A group of 3, 4 and 5 digits separated by /, and starting and ending with '+++' or '\*\*\*'. The last 2 digits of a valid OGM is the remainder of the euclidean division of the first 10 digits of the OGM and 97. When the remainder is 0, the last 2 digits are 97. [Wikipedia (Dutch)](https://nl.wikipedia.org/wiki/Gestructureerde_mededeling)

Setup / installation
====================

[](#setup--installation)

```
$ composer require ruudvdd/ogm
```

Usage
=====

[](#usage)

Generate
--------

[](#generate)

```
$generator = new \Ruudvdd\OGM\Generator();

// Plain number (default)
$generator->generate(false);

// Formatted
$generator->generate(true);

// Choose the first x digits (max 10)
$generator->generate(false, 1234);
```

Validate
--------

[](#validate)

```
$validator = new \Ruudvdd\OGM\Validator();

// Validate a formatted OGM
$validator->isValid('+++090/9337/55493+++'); // true

// Validate a plain number (12 digits)
$validator->digitsAreValid('090933755493');
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~8 days

Total

2

Last Release

3293d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.6.

0.2.0PHP &gt;=5.6

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4902556?v=4)[ruudvdd](/maintainers/ruudvdd)[@ruudvdd](https://github.com/ruudvdd)

---

Top Contributors

[![ruudvdd](https://avatars.githubusercontent.com/u/4902556?v=4)](https://github.com/ruudvdd "ruudvdd (1 commits)")

---

Tags

BankogmBelgiumBelgiëOverschrijvingGestructureerdMededeling

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ruudvdd-ogm/health.svg)

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

###  Alternatives

[jschaedl/bav

bankaccount validation

14356.1k](/packages/jschaedl-bav)[glutnix/nz-bank-account-validation

A library that validates New Zealand bank account numbers (BECS numbers) as matching the format, within valid ranges, and contain a valid checksum.

1172.3k](/packages/glutnix-nz-bank-account-validation)[codelicious/php-belgianbankstatement-parser

Unified parser for several bank statement formats from Belgian banks

1312.4k](/packages/codelicious-php-belgianbankstatement-parser)[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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