Download the PHP package flatphp/validation without Composer
On this page you can find all versions of the php package flatphp/validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download flatphp/validation
More information about flatphp/validation
Files in flatphp/validation
Download flatphp/validation
More information about flatphp/validation
Files in flatphp/validation
Vendor flatphp
Package validation
Short Description light validator
License MIT
Package validation
Short Description light validator
License MIT
Keywords validatorvalidation
Please rate this library. Is it a good library?
Informations about the package validation
validation
light validator
Install
Usage
failed referenced value $failed 格式
single value validate
simple use
How to custom your own validate method 加入定制自己的验证方法
- Just extends Validator class and add your own method (继承)
- Or Just write global function (写全局函数)
notes:
method|function should be like isXxx($value) or isXxx($value, $params), example:
方法或函数格式必须是这样的,参考以下:
Methods 已有的方法和规则
| method | rule | note |
|---|---|---|
| isRequired | require | except 0 |
| isNotempty | notempty | just empty() check |
| isEmail | ||
| isDate | date | |
| isDatetime | datetime | |
| isUrl | url | |
| isMatch | match | preg_match patten |
| isLength | length | second parameter is the length range, e.g. 10,20 |
| isRange | range | second parameter is range, e.g. 10,20 |
| isBool | bool | [true, false, 0, 1, '0', '1'] |
| isString | string | |
| isInt | int | |
| isNumeric | numeric | |
| isArray | array | |
| isEqual | equal | == |
| isSame | same | === |
| isIp | ip | |
| isJson | json | |
| isIn | in | second parameter e.g. aa,bb,cc |
| isNotin | notin |
All versions of validation with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5
The package flatphp/validation contains the following files
Loading the files please wait ...