Skip to content

laravel-validation-rules/colour

Repository files navigation

Colour

Validates colours, currently supporting hex codes only.

Installation

composer require laravel-validation-rules/colour

Usage

use LVR\Colour\Hex;

$request->validate([
    'colour' => ['required', new Hex],
]);