承接 lamiaoy/validation 相关项目开发

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

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

lamiaoy/validation

最新稳定版本:1.0.2

Composer 安装命令:

composer require lamiaoy/validation

包简介

README 文档

README

General Validation library

Overview and structure

The library provides a collection of interfaces and some default implementations for the task of validation.

ValidationUtils is an interface of common functions that can be shared through validating classes (typically implementing for example TypeValidation)

ValidationDefaultValues is an interface providding a list of default values for validation constraints so if the constraint x is not set for field y, the constraint x will be validated against default value for field y (this way only the values differing from default need to be confed).

  • ValidationDefaultValuesImpl is an implementing class that takes it's values from ini file that is injected as a path to constructor of the class.

ValidationCollection is a collection of TypeValidations.

TypeValidation is a general interface for a simple validation.

  • Implementing base class is AbstractTypeValidation

    • Common validation functions injected as ValidationUtils interface
    • Default values injected as ValidationDefaultValues interface
  • ArrayValidation, StringValidation etc typically extend AbstractTypeValidation

  • GeneralValidation is an implementation that coordinates a group of TypeValidation implementations injected to it in ValidationCollection through constructor. The TypeValidation implementation of given type is used for validating, unless not defined whereas the default type is used.

Validation is a general interface for taking an array of fields and validating them with constructor injected TypeValidation against the field constraint configuration also injected into constructor.

Example usage

Contribution guidelines

  • Implementation classes must be unit tested

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-02-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固