Download the PHP package lit/parameter without Composer

On this page you can find all versions of the php package lit/parameter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package parameter

LitParameter 映射验证器

说明

映射验证器: 是解决业务中数据映射与参数验证有效性的解决方案.

旧版本

V1 实参验证器 参考文档

此文档为最新版本文档.

初始化

``

使用方法

使用验证器

映射器赋值

``

获取已赋值属性的值

``

获取批量获取属性的值

``

指定必填参数并验证

``

验证失败的调试方法

``

示例

验证一个数组的有效性

``

验证一个函数参数的有效性

``

支持方法

方法 说明
isString() 初始化一个字符串类型参数验证
isNumber() 初始化一个整型类型参数验证
isNumeric() 初始化一个数值类型参数验证
isArray() 初始化一个数组类型参数验证
isFloat() 初始化一个浮点类型参数验证
errCode() 获取验证错误代码
errMsg() 获取验证错误信息
errName() 获取错误的属性名称
errValue() 获取错误属性的值
errCondition() 出错的验证条件

方法列表

可用选项 isString isNumber isArray isNumeric 说明
notNull() ✔️ ✔️ ✔️ ✔️ 非null
notEmpty() ✔️ ✔️ ✔️ ✔️ 非空
callback() ✔️ ✔️ ✔️ ✔️ 使用回调函数验证
length() ✔️ ❌️ 字符串长度
maxLength() ✔️ ❌️ 字符串最大长度
minLength() ✔️ ❌️ 字符串最小长度
in() ✔️ ✔️ ❌️ ✔️ 参数值白名单
between() ❌️ ✔️ ❌️ ✔️ 在 a...b 两个数字(包含)之间
gt() ❌️ ✔️ ❌️ ✔️ 参数值小于一个数字
lt() ❌️ ✔️ ❌️ ✔️ 参数值大于一个数字
ge() ❌️ ✔️ ❌️ ✔️ 参数值大于等于一个数字
le() ❌️ ✔️ ❌️ ✔️ 参数值小于等于一个数字
minSize() ❌️ ❌️ ✔️ ❌️ 数组最小元素数
maxSize() ❌️ ❌️ ✔️ ❌️ 数组最大元素数
incFields() ❌️ ❌️ ✔️ ❌️ 必须包含某些键
excFields() ❌️ ❌️ ✔️ ❌️ 必须排除某些键
setCode() ✔️ ✔️ ✔️ ✔️ 设置验证错误代码
setMsg() ✔️ ✔️ ✔️ ✔️ 设置验证错误信息

All versions of parameter with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lit/parameter contains the following files

Loading the files please wait ....