PHPackages                             russoedu/colorvalidator - 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. russoedu/colorvalidator

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

russoedu/colorvalidator
=======================

Custom Laravel 5 Validator for hexadecimal color

1.0(10y ago)255[1 issues](https://github.com/russoedu/colorvalidator/issues)MITPHPPHP &gt;=5.4.0

Since Sep 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/russoedu/colorvalidator)[ Packagist](https://packagist.org/packages/russoedu/colorvalidator)[ Docs](https://github.com/russoedu/colorvalidator)[ RSS](/packages/russoedu-colorvalidator/feed)WikiDiscussions master Synced 1mo ago

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

Hexadecimal Color Validator Rules for Laravel 5
===============================================

[](#hexadecimal-color-validator-rules-for-laravel-5)

Validator for hexadecimal colors for Laravel 5.

[!\[Software License\]\[ico-license\]](LICENSE.md)

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

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

[](#installation)

Install the package through [Composer](http://getcomposer.org).

```
composer require "russoedu/colorvalidator:1.0"

```

Add the following to your `providers` array in `app/config/app.php`:

```
'providers' = [
    Russoedu\ColorValidator\ColorValidatorServiceProvider::class,
]
```

Usage
-----

[](#usage)

The package extends the `Illuminate\Validator` via a service provider, so all you have to do is use the `hex_color`-rule.

```
public function store(Request $request) {
    $this->validate($request, [
        'color' => 'hex_color'
    ]);
}
```

Of course, you can roll your own error messages:

```
$validator = Validator::make($request->all(), [
    'color' => 'hex_color'
], [
    'color.hex_color' => "Hey! That's not real color!"
]);

if($validator->fails()) {
    return $this->returnWithErrorAndInput($validator);
}
```

If you're using the validation throughout your application, you also might want to put the error message in your lang-files.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

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

3903d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72f159a3416ffa0c4003ea0baedf2060278a3674ee11e2428c30f92f39d09858?d=identicon)[russoedu](/maintainers/russoedu)

---

Top Contributors

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

---

Tags

laravelvalidatorcolorlaravel5

### Embed Badge

![Health badge](/badges/russoedu-colorvalidator/health.svg)

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

###  Alternatives

[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[schuppo/password-strength

This package provides a validator for ensuring strong passwords in Laravel 4 applications.

1432.7M1](/packages/schuppo-password-strength)[illuminatech/validation-composite

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

184485.5k](/packages/illuminatech-validation-composite)

PHPackages © 2026

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