PHPackages                             livingstoneco/minimum-spaces - 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. livingstoneco/minimum-spaces

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

livingstoneco/minimum-spaces
============================

Laravel validation rule requiring a minimum number of spaces in a field

1.0(2w ago)09↓100%MITPHPPHP ^8.2CI passing

Since May 20Pushed 2w agoCompare

[ Source](https://github.com/livingstoneco/MinimumSpaces)[ Packagist](https://packagist.org/packages/livingstoneco/minimum-spaces)[ RSS](/packages/livingstoneco-minimum-spaces/feed)WikiDiscussions main Synced 1w ago

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

Minimum Spaces (Laravel)
========================

[](#minimum-spaces-laravel)

Validation for Laravel 11+ that requires a field to contain at least a given number of space characters (`U+0020`).

The default validation message is:

> We couldn't deliver your message. Please try again with a little more detail.

You can override it per rule or when calling the validator (see below).

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

[](#installation)

```
composer require livingstoneco/minimum-spaces
```

Laravel will register the service provider automatically (package discovery).

Usage
-----

[](#usage)

### Rule object (recommended)

[](#rule-object-recommended)

```
use MinimumSpaces\Rules\MinimumSpaces;

$request->validate([
    'message' => ['required', 'string', new MinimumSpaces(2)],
]);
```

### String rule alias

[](#string-rule-alias)

```
$request->validate([
    'message' => ['required', 'string', 'min_spaces:2'],
]);
```

The numeric parameter is the minimum number of spaces required.

### Custom error message

[](#custom-error-message)

**Rule object** — pass a second argument:

```
new MinimumSpaces(2, 'My custom error message.')
```

**String rule or any validator** — pass a messages array (attribute + snake-case rule name):

```
$request->validate(
    ['message' => ['required', 'string', 'min_spaces:2']],
    ['message.min_spaces' => 'Please add more detail before sending.'],
);

// Or with Validator::make / FormRequest::validateResolved patterns:
Validator::make($data, $rules, [
    'message.min_spaces' => 'Please add more detail before sending.',
]);
```

Testing
-------

[](#testing)

Clone the package and run:

```
composer install
composer test
```

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance96

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

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 ~0 days

Total

4

Last Release

20d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a52ee39e54c4cee173a94e01f1c7f808dca3e139e7835c35bfdd1df67ca7aa5b?d=identicon)[livingstoneco](/maintainers/livingstoneco)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/livingstoneco-minimum-spaces/health.svg)

```
[![Health](https://phpackages.com/badges/livingstoneco-minimum-spaces/health.svg)](https://phpackages.com/packages/livingstoneco-minimum-spaces)
```

###  Alternatives

[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76318.2M110](/packages/laravel-mcp)[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[illuminate/validation

The Illuminate Validation package.

18837.7M1.6k](/packages/illuminate-validation)[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.5M73](/packages/spatie-laravel-honeypot)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)

PHPackages © 2026

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