PHPackages                             rocketfellows/no-vat-format-validator - 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. rocketfellows/no-vat-format-validator

ActiveLibrary

rocketfellows/no-vat-format-validator
=====================================

v1.0.0(3y ago)0301MITPHPPHP &gt;=7.4

Since Mar 30Pushed 3y agoCompare

[ Source](https://github.com/rocketfellows/no-vat-format-validator)[ Packagist](https://packagist.org/packages/rocketfellows/no-vat-format-validator)[ RSS](/packages/rocketfellows-no-vat-format-validator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (1)

Norway vat format validator
===========================

[](#norway-vat-format-validator)

[![Code Coverage Badge](./badge.svg)](./badge.svg)

This component provides Norway vat number format validator.

Implementation of interface **rocketfellows\\CountryVatFormatValidatorInterface\\CountryVatFormatValidatorInterface**

Depends on

Vat number validation description
---------------------------------

[](#vat-number-validation-description)

The technical construction of the number specifies a modulus 11 check digit at the end. The weighting factors are 3, 2, 7, 6, 5, 4, 3, 2 calculated from the first digit. The digits are thus multiplied by the weighting factors and the product sum divided by 11. The leftover from the division is subtracted by 11 and the result becomes the MOD11 checksum digit.

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

[](#installation)

```
composer require rocketfellows/no-vat-format-validator
```

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

[](#usage-example)

Valid Norway vat number (valid expected format and checksum digit):

```
$validator = new NOVatFormatValidator();
$validator->isValid('NO234154877MVA');
$validator->isValid('NO234154877');
$validator->isValid('234154877MVA');
$validator->isValid('234154877');
```

Returns:

```
true
true
true
true
```

Invalid Norway vat number (invalid format or checksum digit):

```
$validator = new NOVatFormatValidator();
$validator->isValid('DE234154877MVA'); // invalid format
$validator->isValid('DE234154877'); // invalid format
$validator->isValid('NO234154879MVA'); // invalid checksum digit
$validator->isValid('NO234154879'); // invalid checksum digit
$validator->isValid('234154879'); // invalid checksum digit
$validator->isValid('');
```

```
false
false
false
false
false
false
```

Contributing
------------

[](#contributing)

Welcome to pull requests. If there is a major changes, first please open an issue for discussion.

Please make sure to update tests as appropriate.

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.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

Unknown

Total

1

Last Release

1135d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/81402dcd0a07ad550b7f80f5871e7c302770b29d4c73a52fc35ba697f702d56e?d=identicon)[arslanim](/maintainers/arslanim)

---

Top Contributors

[![arslanim](https://avatars.githubusercontent.com/u/22678154?v=4)](https://github.com/arslanim "arslanim (13 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

country-vat-number-format-validatorno-vat-number-format-validatornorway-vat-number-format-validatorvat-number-format-validator

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rocketfellows-no-vat-format-validator/health.svg)

```
[![Health](https://phpackages.com/badges/rocketfellows-no-vat-format-validator/health.svg)](https://phpackages.com/packages/rocketfellows-no-vat-format-validator)
```

PHPackages © 2026

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