Download the PHP package hehex/hehep-hvalidation without Composer

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

hehep-hvalidation

介绍

安装

组件配置

基本示例

扩展验证器

步骤1。创建自定义验证器集合类

步骤2。创建手机号码验证器类

步骤3。验证器类组件配置

安装验证器

注解验证

默认验证器

验证器 说明 规则示例
required 必填字段 ['fieldname', ['required'] ]
empty 不为空字段,常配合!使用 ['fieldname', ['empty'] ]['fieldname', ['!empty'] ]
float 数值必须为浮点数,即整型,或带小数点的数值 ['fieldname', ['float','decimalPoint'=>'最少保留的小数点位数,如2','symbol'=>'正负符号,如-,+'] ]
int 数值必须为整型 ['fieldname', ['int','symbol'=>'正负符号,如-,+'] ]
boolean 数值必须为布尔值,True or False ['fieldname', ['boolean'] ]
tel 11 位手机号 ['fieldname', ['tel'] ]
date 验证日期格式 ['fieldname', ['date',["format":'Y-m-d']] ]
rangedate 验证日期范围 ['fieldname', ['rangedate',"min"=>'最小日期,如2019-10-10','max'=>'最大日期,如2010-10-11'] ]
email 验证邮箱格式 ['fieldname', ['email'] ]
file 验证表单file格式 ['fieldname', ['file','max_size'=>0.5,'exts'=>['jpg','gif','png'],'mimes'=>['image/gif']] ]
ip 验证ip格式,支持mode 格式 ip4,ip6 ['fieldname', ['ip',"mode"=>"ip4"]
ip4 验证ip4格式 ['fieldname', ['ip4']]
ip6 验证ip6格式 ['fieldname', ['ip6']]
url 验证url 地址格式,支持设置defaultScheme ['fieldname', ['url',"defaultScheme"=>"https"]]
range 验证数值范围大小 ['fieldname', ['range',"min"=>10,'max'=>20] ]
compare 比较指定数值大小,支持操作符,'gt','egt','lt','elt','eq','>','>=','<','<=','=' ['fieldname', ['compare',"number"=>10,"operator"=>"gt"] ]
eq 验证数值相等,compare 操作符 eq 的简写 ['fieldname', ['eq',"number"=>1]]
gt 验证数值大于,compare 操作符 gt 的简写 ['fieldname', ['gt',"number"=>1]]
egt 验证数值大于等于,compare 操作符 egt 的简写 ['fieldname', ['egt',"number"=>1]]
lt 验证数值小于,compare 操作符 lt 的简写 ['fieldname', ['lt',"number"=>1]]
elt 验证数值小于等于,compare 操作符 elt 的简写 ['fieldname', ['elt',"number"=>1]]
minlen 验证字符最小长度 ['fieldname', ['minlen',"number"=>1]]
maxlen 验证字符最大长度 ['fieldname', ['maxlen',"number"=>1]]
eqlen 验证字符固定长度 ['fieldname', ['eqlen',"number"=>1]]
rangelen 验证字符长度范围 ['fieldname', ['rangelen',"min"=>1,'max'=>3]]
currency 验证货币数值,比如0.51,decimalPoint 表示最多几位小数,默认最多2位 ['fieldname', ['currency',"decimalPoint"=>2]]
cn 验证中文格式 ['fieldname', ['ch']]
en 验证英文格式 ['fieldname', ['en']]
card 验证身份证格式 ['fieldname', ['card']]
alpha 验证包含字母字符格式 ['fieldname', ['alpha']]
alphaNum 验证包含字母、数字格式 ['fieldname', ['alphaNum']]
alphaDash 验证字母、数字、破折号( - )以及下划线( _ )格式 ['fieldname', ['alphaDash']]
inlist 输入的值或值集合必须包含在指定的列表 ['fieldname', ['inlist',['numbers'=>['1','2','3']]]]
enum 输入的值必须包含在指定的列表 ['fieldname', ['enum',['numbers'=>['1','2','3']]]]
notin 输入的值必须不包含在指定的列表 ['fieldname', ['notin']]
vlist 给列表里的每个元素指定验证器 ['fieldname', ['vlist',[ ['int'],['minlen'] ]]]
ids 验证id值是否为整型 ['fieldname', ['ids']]
eqstrfield 验证字段与指定字段值是否相等 ['fieldname', ['eqstrfield',"field"=>"confirmpassword"]]]]
eqintfield 验证字段与指定字段数值是否相等 ['fieldname', ['eqintfield',"field"=>"age"]]]
gtintfield 验证字段与指定字段数值是否大于 ['fieldname', ['gtintfield',"field"=>"age"]]
egtintfield 验证字段与指定字段数值是否大于等于 ['fieldname', ['egtintfield',"field"=>"age"]]
ltintfield 验证字段与指定字段数值是否小于 ['fieldname', ['ltintfield',"field"=>"age"]]
eltintfield 验证字段与指定字段数值是否小于等于 ['fieldname', ['eltintfield',"field"=>"age"]]
gtdatefield 验证日期字段与指定日期字段数值是否大于 ['enddate', ['gtdatefield',"field"=>"startdate"]]
egtdatefield 验证日期字段与指定日期字段数值是否大于等于 ['enddate', ['egtdatefield',"field"=>"startdate"]]]
ltdatefield 验证日期字段与指定日期字段数值是否小于 ['enddate', ['ltdatefield',"field"=>"startdate"]]
eltdatefield 验证日期字段与指定日期字段数值是否小于等于 ['enddate', ['eltdatefield',"field"=>"startdate"]]

All versions of hehep-hvalidation with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
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 hehex/hehep-hvalidation contains the following files

Loading the files please wait ....