承接 nikhilbhatia22/laravel-validator-color 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nikhilbhatia22/laravel-validator-color

最新稳定版本:v11.0.0

Composer 安装命令:

composer require nikhilbhatia22/laravel-validator-color

包简介

Validate that a certain value is a valid CSS color string in Laravel 5 and above

README 文档

README

Latest Version Software License For Laravel 5

This package will let you validate that a certain value is a valid CSS color string.

Installation

Install via composer - In the terminal:

composer require nikhilbhatia22/laravel-validator-color

For Laravel version below 5.5, add the following to the providers array in your config/app.php

Nikhilbhatia22\Validator\Color\ServiceProvider::class

Usage

// Test any color type
Validator::make(['test' => '#454ACF'], ['test' => 'color']);

// Test for rgb 
Validator::make(['test' => 'rgb(0, 200, 150)'], ['test' => 'color_rgb']);

// Test for rgba 
Validator::make(['test' => 'rgba(0, 200, 150, 0.52)'], ['test' => 'color_rgba']);

// Test for hex 
Validator::make(['test' => '#333'], ['test' => 'color_hex']);

// Test for css color keyword 
Validator::make(['test' => 'gold'], ['test' => 'color_keyword']);

统计信息

  • 总下载量: 29.48k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 24
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-20