Download the PHP package eden/validation without Composer
On this page you can find all versions of the php package eden/validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eden/validation
More information about eden/validation
Files in eden/validation
Package validation
Short Description Eden validation component.
License MIT
Homepage http://eden-php.com
Informations about the package validation
Eden Validation
- Install
- Introduction
- API
- isType
- greaterThan
- greaterThanEqualTo
- lessThan
- lessThanEqualTo
- lengthGreaterThan
- lengthGreaterThanEqualTo
- lengthLessThan
- lengthLessThanEqualTo
- notEmpty
- startsWithLetter
- alphaNumeric
- alphaNumericUnderScore
- alphaNumericHyphen
- alphaNumericLine
- set
- Contributing
====
Install
composer install eden/validation
====
Introduction
Instantiate validation in this manner.
====
API
====
isType
Returns true if the value is a given type
Usage
Parameters
*string $type
- The data type to check forbool $soft
- This is like == vs ===
Returns bool
Example
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
====
greaterThan
Returns true if the value is greater than the passed argument
Usage
Parameters
*int $number
- Number to test against
Returns bool
Example
====
greaterThanEqualTo
Returns true if the value is greater or equal to than the passed argument
Usage
Parameters
*int $number
- Number to test against
Returns bool
Example
====
lessThan
Returns true if the value is less than the passed argument
Usage
Parameters
*int $number
- Number to test against
Returns bool
Example
====
lessThanEqualTo
Returns true if the value is less than or equal the passed argument
Usage
Parameters
*int $number
- Number to test against
Returns bool
Example
====
lengthGreaterThan
Returns true if the value length is greater than the passed argument
Usage
Parameters
*int $number
- Number to test against
Returns bool
Example
====
lengthGreaterThanEqualTo
Returns true if the value length is greater than or equal to the passed argument
Usage
Parameters
*int $number
- Number to test against
Returns bool
Example
====
lengthLessThan
Returns true if the value length is less than the passed argument
Usage
Parameters
*int $number
- Number to test against
Returns bool
Example
====
lengthLessThanEqualTo
Returns true if the value length is less than or equal to the passed argument
Usage
Parameters
*int $number
- Number to test against
Returns bool
Example
====
notEmpty
Returns true if the value is not empty
Usage
Parameters
Returns bool
====
startsWithLetter
Returns true if the value starts with a specific letter
Usage
Parameters
Returns bool
====
alphaNumeric
Returns true if the value is alpha numeric
Usage
Parameters
Returns bool
====
alphaNumericUnderScore
Returns true if the value is alpha numeric underscore
Usage
Parameters
Returns bool
====
alphaNumericHyphen
Returns true if the value is alpha numeric hyphen
Usage
Parameters
Returns bool
====
alphaNumericLine
Returns true if the value is alpha numeric hyphen or underscore
Usage
Parameters
Returns bool
====
set
Sets the value to be validated
Usage
Parameters
*mixed $value
- value
Returns Eden\Validation\Index
Example
====
Contributing to Eden
Contributions to Eden are following the Github work flow. Please read up before contributing.
Setting up your machine with the Eden repository and your fork
- Fork the repository
- Fire up your local terminal create a new branch from the
v4
branch of your fork with a branch name describing what your changes are. Possible branch name types:- bugfix
- feature
- improvement
- Make your changes. Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")
Making pull requests
- Please ensure to run
phpunit
before making a pull request. - Push your code to your remote forked version.
- Go back to your forked version on GitHub and submit a pull request.
- An Eden developer will review your code and merge it in when it has been classified as suitable.