Download the PHP package grithin/phpinput without Composer
On this page you can find all versions of the php package grithin/phpinput. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download grithin/phpinput
More information about grithin/phpinput
Files in grithin/phpinput
Download grithin/phpinput
More information about grithin/phpinput
Files in grithin/phpinput
Vendor grithin
Package phpinput
Short Description PHP Tools for handling input.
License Apache-2.0
Homepage http://devtools.grithin.com
Package phpinput
Short Description PHP Tools for handling input.
License Apache-2.0
Homepage http://devtools.grithin.com
Keywords php input tools
Please rate this library. Is it a good library?
Informations about the package phpinput
Grithin's PHP Input Tools
Purpose
Provide a succinct way for common filtering and validating of input
See the Input class inline documentation
Brief
Rules is an array of rules whos keys map the keys of the input
Rules are parsed in the order provided
A rule consists of steps
Each rule can be an array of steps or a string of steps separated with ','
Every step consists of at most three parts
- prefix
- handler
- parameters
The rule looks like one of the following
handler|param1;param2;param3, handler, handler
['handler|param1;param2;param3', handler, handler]
[[handler, param1, param2, param2], handler, handler]
[[[prefix, callback], param1, param2, param2], handler, handler]
Notice, as a string, parameters are separated with ";"
The prefix can be some combination of the following
- "!" to break on error with no more rules for that field
- "!!" to break on error with no more rules for any field
- "?" to indicate the validation is optional, and not to throw an error (useful when combined with '!' => '?!v.filled,email')
- "~" to indicate if the validation does not fail, then there was an error
- "&" to indicate code should break if there were any previous errors on that field. This moves around the responsibility of ending on error, which is sometimes desirable with prefixed validations :
prefixed_validation.concat ['&validation2',...]
- "&&" to indicate code should break if there were any previous errors on any field in the validate run
The handler can be one of the following
- "f.name" or "filter.name" where 'name' is a method of \Grithin\Filter
- "v.name" or "validate.name" where 'name' is a method of \Grithin\Validate
- "g.name" or "global.name" where name is a global user function
- "l.instance.name" or "local.instance.name" where "instance" is an instance name of $this->localInstances and "name" is the method
- "class.method" where "class" is the name of a class and "method" is a name of a static method on that class
- An actual callback-able value. For instance ['\Grithin\Filter','trim']
Example
All versions of phpinput with dependencies
PHP Build Version
Package Version
The package grithin/phpinput contains the following files
Loading the files please wait ....