PHPackages                             liagkos/laravel-grvatid-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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. liagkos/laravel-grvatid-validator

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

liagkos/laravel-grvatid-validator
=================================

Validator for Laravel in order to check if a number is POTENTIALLY valid in Greek VAT ID Registry

v1.0.0(8y ago)2101MITPHPPHP &gt;=7.1.3

Since Apr 4Pushed 8y ago2 watchersCompare

[ Source](https://github.com/liagkos/laravel-grvatid-validator)[ Packagist](https://packagist.org/packages/liagkos/laravel-grvatid-validator)[ RSS](/packages/liagkos-laravel-grvatid-validator/feed)WikiDiscussions master Synced yesterday

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

Greek VAT ID Validator for Laravel
==================================

[](#greek-vat-id-validator-for-laravel)

The Greek VAT ID validator checks if a number is POTENTIALLY valid in Greek VAT ID Registry.

Validator does NOT check if VAT ID does actually belong to a person or a company, it checks only if it obeys the algorithm of a valid Greek VAT ID:

```
1. VAT ID = 090000045
2. Calculate sum of 0*2^8+9*2^7+0*2^6+0*2^5+0*2^4+0*2^3+0*2^2+4*2^1 = 1160
3. Calculate mod11 = 1160 % 11 = 5
4. Calculate mod10 = 5 % 10 = 5
5. mod10 (5) is equal to 5 (last digit), so VAT ID is VALID

```

```
1. VAT ID = 123456789
2. Calculate sum of 1*2^8+2*2^7+3*2^6+4*2^5+5*2^4+6*2^3+7*2^2+8*2^1 = 1004
3. Calculate mod11 = 1004 % 11 = 3
4. Calculate mod10 = 3 % 10 = 3
5. mod10 (3) is not equal to 9 (last digit), so VAT ID is INVALID

```

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

[](#installation)

Install the package using Composer:

```
composer require liagkos/laravel-grvatid-validator

```

Laravel's service provider discovery will automatically configure the Grvatval service provider for you.

Using the `grvatval` validator
------------------------------

[](#using-the-grvatval-validator)

After installation, the `grvatval` validator will be available for use directly in your validation rules.

```
'vatid' => 'grvatval',
```

Within the context of a registration form, it would look like this:

```
return Validator::make($data, [
    'name' => 'required',
    'email' => 'required|string|email',
    'password' => 'required',
    'vatid' => 'required|grvatval'
]);
```

Using the Rule Object
---------------------

[](#using-the-rule-object)

Alternatively, you can use the `Liagkos\Grvatval\Grvatval` [Validation Rule Object](https://laravel.com/docs/5.5/validation#using-rule-objects)instead of the `grvatval` alias if you prefer:

```
return Validator::make($data, [
    'name' => 'required',
    'email' => 'required|string|email',
    'password' => 'required',
    'vatid' => ['required', new \Liagkos\Grvatval\Grvatval],
]);
```

Validation message
------------------

[](#validation-message)

You will need to assign your own validation message within the `resources/lang/*/validation.php` file(s). Both the Rule object and the `grvatval` validator alias refer to the validation string `validation.grvatval`.

Testing
-------

[](#testing)

Just run the the test in `tests` directory. I use the [orchestra/testbench](https://github.com/orchestral/testbench) along with PHPUnit.

Credits
-------

[](#credits)

Since I'm quite new in all Laravel stuff, I got the idea from [Stephen Rees-Carten](https://github.com/valorin) and his own [valorin/pwned-validator](https://github.com/valorin/pwned-validator) validator, from whom I used some code and README.md stuff, modified accordingly to make this validator. Thank you Stephen, live long and propsper!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

2960d ago

### Community

Maintainers

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

---

Top Contributors

[![liagkos](https://avatars.githubusercontent.com/u/15843357?v=4)](https://github.com/liagkos "liagkos (3 commits)")

---

Tags

greecelaravellaravel-packagevalidationvalidation-libraryvat-validationvat-validator

### Embed Badge

![Health badge](/badges/liagkos-laravel-grvatid-validator/health.svg)

```
[![Health](https://phpackages.com/badges/liagkos-laravel-grvatid-validator/health.svg)](https://phpackages.com/packages/liagkos-laravel-grvatid-validator)
```

###  Alternatives

[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)

PHPackages © 2026

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