PHPackages                             vdhicts/laravel-validation-rules - 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. vdhicts/laravel-validation-rules

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

vdhicts/laravel-validation-rules
================================

Collection of validation rules for Laravel.

v9.0.0(2mo ago)627.6k↓50%1MITPHPPHP &gt;=8.2CI passing

Since Oct 31Pushed 2mo agoCompare

[ Source](https://github.com/vdhicts/laravel-validation-rules)[ Packagist](https://packagist.org/packages/vdhicts/laravel-validation-rules)[ Docs](https://github.com/vdhicts/laravel-validation-rules)[ RSS](/packages/vdhicts-laravel-validation-rules/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (20)Used By (0)

Laravel Validation Rules
========================

[](#laravel-validation-rules)

This package offers extra validation rules for Laravel.

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

[](#requirements)

This package requires Laravel 11+ and PHP 8.2+. If you need to support older version, see the table below:

VersionCompatible with9.0.013+7.0.012+6.0.011+4.0.0+10+3.0.09+1.4.0+8+1.2.0+7+1.1.06+1.0.15.7+Installation
------------

[](#installation)

You can install the package via composer:

`composer require vdhicts/laravel-validation-rules`

The package will automatically register itself in Laravel.

Translation
-----------

[](#translation)

The package includes both English and Dutch translations. The translations can be published by running:

`php artisan vendor:publish`

Available Rules
---------------

[](#available-rules)

### BicNumber

[](#bicnumber)

Validates the provided [BIC number](https://www.betaalvereniging.nl/en/focus/giro-based-and-online-payments/bank-identifier-code-bic-for-sepa-transactions/).

```
'field' => [new BicNumber()],
```

### Contains

[](#contains)

Validates if the value contains a certain phrase.

```
'field' => [new Contains($needle)],
```

### ContainsAny

[](#containsany)

Validates if the value contains any of the provided phrases.

```
'field' => [new ContainsAny(['foo', 'bar'])],
```

### DateAfterOrEqual

[](#dateafterorequal)

Validates if the value is a date after or equals the provided date (Carbon).

```
'field' => [new DateAfterOrEqual($date)],
```

### DateBeforeOrEqual

[](#datebeforeorequal)

Validates if the value is a date before or equals the provided date (Carbon).

```
'field' => [new DateBeforeOrEqual($date)],
```

### DateHasSpecificMinutes

[](#datehasspecificminutes)

Validates if the selected minutes for the provided date are according to the available minutes.

```
'field' => [new DateHasSpecificMinutes([0, 15, 30, 45])],
```

When the date is not according to the 'Y-m-d H:i' format then you are able to specify the format as second parameter:

```
'field' => [new DateHasSpecificMinutes([0, 15, 30, 45], 'd-m-Y H:i')],
```

### DutchPhone

[](#dutchphone)

Validates if the value is a valid Dutch phone number. Both mobile or landlines are supported. See the `Phone` validation rule to validate a phone number which isn't limited to the Netherlands.

```
'field' => [new DutchPhone()],
```

### DutchPostalCode

[](#dutchpostalcode)

Validates if the value is a valid Dutch zip code, like `1234AB`.

```
'field' => [new DutchPostalCode()],
```

### HostName

[](#hostname)

Validates if the value contains a valid hostname, like `example.com`.

```
'field' => [new HostName()],
```

### InternationalBankAccountNumber

[](#internationalbankaccountnumber)

Validates if the value contains a valid [IBAN](https://en.wikipedia.org/wiki/International_Bank_Account_Number).

```
'field' => [new InternationalBankAccountNumber()],
```

### Interval

[](#interval)

Validates if the value is an interval, i.e. `PT30S`.

```
'field' => [new Interval()],
```

### MaximumHourDifference

[](#maximumhourdifference)

Validates if the value is differing less then the provided amount of hours.

```
'field' => [new MaximumHourDifference($start, 10)];
```

### Mime Type

[](#mime-type)

Validates if the value is a structural valid MIME.

```
'field' => [new MimeType()],
```

### NotContains

[](#notcontains)

Validates if the value *NOT* contains a certain phrase.

```
'field' => [new NotContains($needle)],
```

### Phone

[](#phone)

Validates if the value is a valid phone number.

```
'field' => [new Phone()],
```

### Positive interval

[](#positive-interval)

Validates if the value is an interval and the interval is positive.

```
'field' => [new PositiveInterval()],
```

### Price

[](#price)

Validates if the value is a valid price. The rule optionally accepts a specific decimal sign. When the decimal isn't provided it accepts both `,` or `.` signs.

```
'field' => [new Price()], // accepts both , and .
'field' => [new Price(',')], // accepts only ,
```

### Secure url

[](#secure-url)

Validates if the value is a valid secure url, i.e. is a HTTPS url.

```
'field' => [new SecureUrl()],
```

### Semver

[](#semver)

Validates if the value is a valid version according to the [Semver](https://semver.org/) standard.

```
'field' => [new Semver()],
```

### VatNumber

[](#vatnumber)

Validates if the value is a properly formatted VAT number.

```
'field' => [new VatNumber()],
```

**Be aware**: It doesn't check if the number is known in the VAT database. If you need to know the VAT number is truly legit, check with [VIES](https://ec.europa.eu/taxation_customs/vies/#/vat-validation).

### VersionNumber

[](#versionnumber)

Validates if the value is a valid version number. The rule accepts both `x.y.z` and `x.y` formats. The parameter `requirePatch` allows you to require the `z` part of the version number. This is useful for validation PHP version numbers for example.

```
'field' => [new VersionNumber(requirePatch: true)],
```

Contribution
------------

[](#contribution)

Any contribution is welcome, but it should be (unit) tested and meet the PSR-12 standard and please create one pull request per feature. In exchange, you will be credited as contributor on this page.

Security
--------

[](#security)

If you discover any security related issues in this or other packages of Vdhicts, please email instead of using the issue tracker.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance88

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 90.3% 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 ~158 days

Recently: every ~183 days

Total

18

Last Release

61d ago

Major Versions

4.0.0 → 5.0.02023-12-09

5.0.0 → v6.0.02024-03-16

v6.0.0 → v7.0.02025-02-24

v7.0.0 → v8.0.02025-03-14

v8.1.0 → v9.0.02026-03-18

PHP version history (8 changes)1.0.0PHP ^7.1

1.1.0PHP ^7.2

1.4.0PHP ^7.3

2.0.0PHP ^7.4

2.1.0PHP ^7.4|^8.0

3.0.0PHP ^7.4|^8.0|^8.1

4.0.0PHP &gt;=8.1

v6.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/88d23e7b707d1cfe0eea91c00590613f45e0c75cb0a3ce89354328332e5c0c02?d=identicon)[vdhicts](/maintainers/vdhicts)

---

Top Contributors

[![dvdheiden](https://avatars.githubusercontent.com/u/90568118?v=4)](https://github.com/dvdheiden "dvdheiden (65 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")

---

Tags

laravelphpvalidationlaravelvalidationrulesvdhicts

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vdhicts-laravel-validation-rules/health.svg)

```
[![Health](https://phpackages.com/badges/vdhicts-laravel-validation-rules/health.svg)](https://phpackages.com/packages/vdhicts-laravel-validation-rules)
```

###  Alternatives

[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

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

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)[galahad/laravel-addressing

Laravel package providing addressing functionality

70316.6k](/packages/galahad-laravel-addressing)[resultsystems/validation

Inspired 'KennedyTedesco Validation' - The power of 'Respect Validation' on Laravel.

2832.4k4](/packages/resultsystems-validation)

PHPackages © 2026

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