Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fusic/valii


https://github.com/fusic/valii

laravel

Last synced: 25 days ago
JSON representation

Awesome Lists containing this project

README

        

# Valii

[![CircleCI](https://img.shields.io/circleci/build/github/fusic/valii.svg?style=flat-square)](https://circleci.com/gh/fusic/valii)
[![Scrutinizer code quality (GitHub/Bitbucket)](https://img.shields.io/scrutinizer/quality/g/fusic/valii.svg?style=flat-square)](https://scrutinizer-ci.com/g/fusic/valii/)
[![Codecov](https://img.shields.io/codecov/c/github/fusic/valii.svg?style=flat-square)](https://codecov.io/gh/fusic/valii/)

## Setup

```
composer require fusic/valii
```

## validation

- Tel
- 電話番号フォーマットチェック
- Hiragana
- ひらがなのみチェック
- Katakana
- カタカナのみチェック
- HankakuKatakana
- 半角カタカナチェック
- Zenkaku
- 全角のみチェック
- ZipCode
- 郵便番号チェック
- MaxByte
- 文字列の幅をチェック

## Usage

```
public function rules()
{
return [
"name" => 'required|hiragana',
"tel" => 'tel',
"zip_code" => [
'zip_code'
],
"strict_zip_code" => [
'required',
'zip_code:strict'
]
];
}
```

## Custom Validation Message

```
php artisan vendor:publish
```