Download the PHP package houdunwang/validate without Composer

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

自动验证

Validate组件提供了方便的验证机制,快速实现验证业务。 [TOC]

安装

使用 composer 命令进行安装或下载源代码使用。 验证组件依赖 Session组件Cookie组件, 请先对这两个组件进行配置才可以使用本组件。

HDPHP 框架已经内置此组件,无需要安装

配置

使用

系统规则

基本语法

闭包验证

验证表字段唯一性

验证表单验证码

处理方式

验证响应由配置文件 system/config/error.php 中的app 配置段决定。

redirect

直接跳转,会分配变量$errors到前台,开发者可以通过模板标签读取错误内容。

show

直接显示错误信息,不需要开发者处理

default

由开发者自行处理,需要使用 \houdunwang\validate\Validate::fail()自行进行判断。

扩展使用

增加规则

第一个参数为验证规则名称,第二参数闭包函数。

验证判断

需要响应方式为default值时有效。

链式操作

获取错误信息

错误信息会记录到模型对象的 error 属性中,使用 getError() 方法获取但需要设置处理方式为 default


All versions of validate with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
houdunwang/config Version ~1.0
houdunwang/session Version ~1.0
houdunwang/view Version ~1.0
houdunwang/response Version ~1.0
houdunwang/request Version ~1.0
houdunwang/db Version ~1.0
houdunwang/code Version ~1.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 houdunwang/validate contains the following files

Loading the files please wait ....