Download the PHP package mlzl/myvalidator without Composer

On this page you can find all versions of the php package mlzl/myvalidator. 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 myvalidator

a validator for php form

欢迎使用!持续维护!有建议什么的请联系 [email protected]谢谢!

用来验证数据的插件

目前拥有的验证器

特殊选项:[下面所示]

  • maxSize [string]

    文件最大尺寸。可用 :maxSize 替换对应的值

  • messageSize [string]

    尺寸不合法时的自定义信息。占位符[:maxSize] 代表限制的最大size

  • allowType [array]

    允许的文件扩展类型列表

  • messageType [string]

    类型不在列表内时的错误信息。占位符[:fileType] 代表上传的文件扩展类型

特殊选项: [下面所示]

  • callback [callable]

    回调函数。返回false代表检验失败,其余代表正常

特殊选项: [下面所示]

  • pattern [string]

    标准正则表达式

*Between

区域值判定,判定对象为数值

特殊选项:[下面所示]

  • min [int]

    最小值【数值】

  • max [int]

    最大值【数值】

*StringLength

字符串长度判定 特殊选项:[下面所示]

  • min [int][默认为0]

    最小值【数值】

  • messageMin [string]

    不满足最小值时的提示语

  • max [int][默认为无上限]

    最大值

  • messageMax [string]

    不满足最大值时的提示语

*ExclusionIn

值的枚举限定

特殊选项:[下面所示]

  • domain [array]

    目标值不能够出现在此数组内

*InclusionIn

值的枚举限定

特殊选项:[下面所示]

  • domain [array]

    目标值必须出现在此数组内

选项解释

ps:带有 [*] 号的都是通用选项

  • allowEmpty

    允许一个值是空字符串或者为null,默认的验证器都是允许为空,NotEmpty验证器没有这个属性

  • interruptOnFail [*]

    当某个规则失败时,中断下面的校验

  • message [*]

    失败提示符。可用 :field 代表对应的键

  • code [*]

    失败码

  • {field}Message [*]

    对应的field的提示语,优先级是 message > {field}Message > defaultMessage

支持多维数组验证

测试

ls tests/|awk '{print $0}'|xargs -I{} ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/{}


All versions of myvalidator with dependencies

PHP Build Version
Package Version
Requires myclabs/deep-copy Version 1.7.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 mlzl/myvalidator contains the following files

Loading the files please wait ....