定制 smart-twists/iranian-information-validator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

smart-twists/iranian-information-validator

Composer 安装命令:

composer require smart-twists/iranian-information-validator

包简介

Additional Iranian Information Validator Functions for the Laravel Framework

README 文档

README

Extension for the Laravel validation class

Installation

You can install this package quick and easy with Composer.

Require the package via Composer:

$ composer require smart-twists/iranian-information-validator

The Validation class is built to work with the Laravel Framework. The integration is done in seconds.

Open your Laravel config file config/app.php and add service provider in the $providers array:

'providers' => array(

    ...

    SmartTwists\IranianInformationValidation\ValidationServiceProvider::class,

),

Usage with Laravel

The installed package provides the following additional validation rules including their error messages.

iban

Checks for a valid International Bank Account Number (IBAN).

creditcard

The given field must be a valid creditcard number.

isbn

The field under validation must be a valid International Standard Book Number (ISBN).

isodate

The field under validation must be a valid date in ISO 8601 format.

nationalcode

The field under validation must be a valid national code.

ir_mobile

The field under validation must be a valid iranian mobile number.

ir_phone

The field under validation must be a valid iranian phone number.

zipcode

The field under validation must be a valid zip code.

Changing the error messages:

Add the corresponding key to /resources/lang/<language>/validation.php like this:

// example
'iban' => 'Please enter IBAN number!',

Or add your custom messages directly to the validator like described in the docs.

Usage outside of Laravel

  • Validator::isIban - Checks if given value is valid International Bank Account Number (IBAN).
  • Validator::isCreditcard - Checks if value is valid creditcard number.
  • Validator::isIsbn - Checks if given value is valid International Standard Book Number (ISBN).
  • Validator::isIsodate - Checks if given value is date in ISO 8601 format.
  • Validator::isNationalcode - checks if given value is valid national code.
  • Validator::isIrMobile - checks if given value is valid Iranian mobile number.
  • Validator::isIrPhone - checks if given value is valid Iranian phone number.
  • Validator::isZipcode - checks if given value is valid zip cide.

License

Intervention Validation Class is licensed under the MIT License.

统计信息

  • 总下载量: 443
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固