LaravelPackages.net
Acme Inc.
Toggle sidebar
liaosp/laravel-validate-ext

laravel validate ext 中文验证

7
6
v1.0.0
About liaosp/laravel-validate-ext

liaosp/laravel-validate-ext is a Laravel package for laravel validate ext 中文验证. It currently has 6 GitHub stars and 7 downloads on Packagist (latest version v1.0.0). Install it with composer require liaosp/laravel-validate-ext. Discover more Laravel packages by liaosp or browse all Laravel packages to compare alternatives.

Last updated

Lravel 验证扩展

Latest Stable Version Total Downloads Daily Downloads License StyleCI

📦Laravel 验证中文,手机号,身份号

安装

$ composer require liaosp/laravel-validate-ext -vvv

使用

| 标识 | 说明 | | ---- | ---- | | chs | 验证某个字段的值只能是汉字 | | chsAlpha | 验证某个字段的值只能是汉字、字母 | | chsAlphaNum | 验证某个字段的值只能是汉字、字母和数字 | | chsDash |验证某个字段的值只能是汉字、字母、数字和下划线_及破折号- | | mobile |验证手机 | | idCard |身份证 |

$data = ['name' => '小廖one'];

$v = \Illuminate\Support\Facades\Validator::make($data, ['name' => 'chsAlpha']);

$this->assertTrue(!$v->fails());

扩展包编写教程

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT

Star History Chart