mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 08:42:15 +02:00
Organize documentation for "Read the Docs"
The current documentation is hosted via GitHub pages rendered by "Couscous". Every time we need a new version of the documentation published we need to manually execute the "couscous". This commit reorganize the documentation to be published to "Read the Docs" because it will also allow us to have documentations per version of the library most importantly provider a search field for the documentation. The documentation will be then published on: https://respect-validation.readthedocs.io/ Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
add542ea48
commit
52614d600d
|
@ -101,8 +101,6 @@ All notable changes of the Respect\Validation releases are documented in this fi
|
||||||
***
|
***
|
||||||
See also:
|
See also:
|
||||||
|
|
||||||
|
- [README](README.md)
|
||||||
- [Contributing](CONTRIBUTING.md)
|
- [Contributing](CONTRIBUTING.md)
|
||||||
- [Feature Guide](docs/README.md)
|
|
||||||
- [Installation](docs/INSTALL.md)
|
|
||||||
- [License](LICENSE.md)
|
- [License](LICENSE.md)
|
||||||
- [Validators](docs/VALIDATORS.md)
|
|
||||||
|
|
|
@ -179,8 +179,8 @@ As we already said, none of them are required but you will help us a lot.
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Our docs at http://respect.github.io/Validation are generated from our Markdown
|
Our docs at http://respect.github.io/Validation are generated from our Markdown
|
||||||
files using [Couscous][]. Add your brand new rule there and everything will be
|
files using [Read the Docs][]. Add your brand new rule there and everything will
|
||||||
updated as soon as possible.
|
be updated automatically.
|
||||||
|
|
||||||
## Running Tests
|
## Running Tests
|
||||||
|
|
||||||
|
@ -234,15 +234,13 @@ $ vendor/bin/php-cs-fixer fix
|
||||||
***
|
***
|
||||||
See also:
|
See also:
|
||||||
|
|
||||||
- [Feature Guide](docs/README.md)
|
- [README](README.md)
|
||||||
- [Installation](docs/INSTALL.md)
|
|
||||||
- [License](LICENSE.md)
|
- [License](LICENSE.md)
|
||||||
- [Validators](docs/VALIDATORS.md)
|
|
||||||
- [Changelog](CHANGELOG.md)
|
- [Changelog](CHANGELOG.md)
|
||||||
|
|
||||||
|
|
||||||
[ArrayType]: https://github.com/Respect/Validation/commit/f08a1fa
|
[ArrayType]: https://github.com/Respect/Validation/commit/f08a1fa
|
||||||
[Couscous]: http://couscous.io/ "Couscous"
|
[Read the Docs]: https://readthedocs.org/ "Read the Docs"
|
||||||
[data provider]: https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers "PHPUnit Data Providers"
|
[data provider]: https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers "PHPUnit Data Providers"
|
||||||
[open an issue]: http://github.com/Respect/Validation/issues
|
[open an issue]: http://github.com/Respect/Validation/issues
|
||||||
[php-cs-fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer "PHP Coding Standard Fixer"
|
[php-cs-fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer "PHP Coding Standard Fixer"
|
||||||
|
|
|
@ -32,8 +32,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***
|
***
|
||||||
See also:
|
See also:
|
||||||
|
|
||||||
|
- [README](README.md)
|
||||||
- [Contributing](CONTRIBUTING.md)
|
- [Contributing](CONTRIBUTING.md)
|
||||||
- [Feature Guide](docs/README.md)
|
|
||||||
- [Installation](docs/INSTALL.md)
|
|
||||||
- [Validators](docs/VALIDATORS.md)
|
|
||||||
- [Changelog](CHANGELOG.md)
|
- [Changelog](CHANGELOG.md)
|
||||||
|
|
12
README.md
12
README.md
|
@ -10,16 +10,18 @@
|
||||||
[The most awesome validation engine ever created for PHP.](http://bit.ly/1a1oeQv)
|
[The most awesome validation engine ever created for PHP.](http://bit.ly/1a1oeQv)
|
||||||
|
|
||||||
- Complex rules made simple: `v::numeric()->positive()->between(1, 255)->validate($input)`.
|
- Complex rules made simple: `v::numeric()->positive()->between(1, 255)->validate($input)`.
|
||||||
- [Granularity control](docs/README.md#validation-methods) for advanced reporting.
|
- Granularity control for advanced reporting.
|
||||||
- More than 100 (fully tested) validators.
|
- More than 100 (fully tested) validators.
|
||||||
- [A concrete API](docs/CONCRETE_API.md) for non fluent usage.
|
- A concrete API for non fluent usage.
|
||||||
- Works on PHP 5.4+ or HHVM 3.3+
|
- Works on PHP 5.4+ or HHVM 3.3+
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
Documentation can be found in https://respect-validation.readthedocs.io
|
||||||
|
and also in the [docs/](docs/index.md) folder.
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
- [Contributing](CONTRIBUTING.md)
|
- [Contributing](CONTRIBUTING.md)
|
||||||
- [Feature Guide](docs/README.md)
|
|
||||||
- [Installation](docs/INSTALL.md)
|
|
||||||
- [License](LICENSE.md)
|
- [License](LICENSE.md)
|
||||||
- [Validators](docs/VALIDATORS.md)
|
|
||||||
- [Changelog](CHANGELOG.md)
|
- [Changelog](CHANGELOG.md)
|
||||||
|
|
|
@ -1,338 +0,0 @@
|
||||||
# Validators
|
|
||||||
|
|
||||||
## Types
|
|
||||||
|
|
||||||
* [ArrayVal](ArrayVal.md)
|
|
||||||
* [ArrayType](ArrayType.md)
|
|
||||||
* [BoolVal](BoolVal.md)
|
|
||||||
* [BoolType](BoolType.md)
|
|
||||||
* [CallableType](CallableType.md)
|
|
||||||
* [Countable](Countable.md)
|
|
||||||
* [Date](Date.md)
|
|
||||||
* [FalseVal](FalseVal.md)
|
|
||||||
* [FloatVal](FloatVal.md)
|
|
||||||
* [FloatType](FloatType.md)
|
|
||||||
* [Instance](Instance.md)
|
|
||||||
* [IntVal](IntVal.md)
|
|
||||||
* [IntType](IntType.md)
|
|
||||||
* [IterableType](IterableType.md)
|
|
||||||
* [NullType](NullType.md)
|
|
||||||
* [Numeric](Numeric.md)
|
|
||||||
* [ObjectType](ObjectType.md)
|
|
||||||
* [ResourceType](ResourceType.md)
|
|
||||||
* [ScalarVal](ScalarVal.md)
|
|
||||||
* [StringType](StringType.md)
|
|
||||||
* [TrueVal](TrueVal.md)
|
|
||||||
* [Type](Type.md)
|
|
||||||
* [Xdigit](Xdigit.md)
|
|
||||||
|
|
||||||
## Generics
|
|
||||||
|
|
||||||
* [AlwaysInvalid](AlwaysInvalid.md)
|
|
||||||
* [AlwaysValid](AlwaysValid.md)
|
|
||||||
* [Call](Call.md)
|
|
||||||
* [Callback](Callback.md)
|
|
||||||
* [FilterVar](FilterVar.md)
|
|
||||||
* [Not](Not.md)
|
|
||||||
* [Optional](Optional.md)
|
|
||||||
* [Type](Type.md)
|
|
||||||
* [When](When.md)
|
|
||||||
|
|
||||||
## Comparing Values
|
|
||||||
|
|
||||||
* [Age](Age.md)
|
|
||||||
* [Between](Between.md)
|
|
||||||
* [Equals](Equals.md)
|
|
||||||
* [Identical](Identical.md)
|
|
||||||
* [Max](Max.md)
|
|
||||||
* [Min](Min.md)
|
|
||||||
|
|
||||||
## Numeric
|
|
||||||
|
|
||||||
* [Between](Between.md)
|
|
||||||
* [BoolType](BoolType.md)
|
|
||||||
* [Even](Even.md)
|
|
||||||
* [Factor](Factor.md)
|
|
||||||
* [Fibonacci](Fibonacci.md)
|
|
||||||
* [Finite](Finite.md)
|
|
||||||
* [FloatVal](FloatVal.md)
|
|
||||||
* [FloatType](FloatType.md)
|
|
||||||
* [Infinite](Infinite.md)
|
|
||||||
* [IntVal](IntVal.md)
|
|
||||||
* [IntType](IntType.md)
|
|
||||||
* [Multiple](Multiple.md)
|
|
||||||
* [Negative](Negative.md)
|
|
||||||
* [NotEmpty](NotEmpty.md)
|
|
||||||
* [Numeric](Numeric.md)
|
|
||||||
* [Odd](Odd.md)
|
|
||||||
* [PerfectSquare](PerfectSquare.md)
|
|
||||||
* [Positive](Positive.md)
|
|
||||||
* [PrimeNumber](PrimeNumber.md)
|
|
||||||
* [Roman](Roman.md)
|
|
||||||
* [Xdigit](Xdigit.md)
|
|
||||||
|
|
||||||
## String
|
|
||||||
|
|
||||||
* [Alnum](Alnum.md)
|
|
||||||
* [Alpha](Alpha.md)
|
|
||||||
* [Between](Between.md)
|
|
||||||
* [Charset](Charset.md)
|
|
||||||
* [Cntrl](Cntrl.md)
|
|
||||||
* [Consonant](Consonant.md)
|
|
||||||
* [Contains](Contains.md)
|
|
||||||
* [Digit](Digit.md)
|
|
||||||
* [EndsWith](EndsWith.md)
|
|
||||||
* [Graph](Graph.md)
|
|
||||||
* [In](In.md)
|
|
||||||
* [Length](Length.md)
|
|
||||||
* [Lowercase](Lowercase.md)
|
|
||||||
* [NotEmpty](NotEmpty.md)
|
|
||||||
* [NoWhitespace](NoWhitespace.md)
|
|
||||||
* [PhpLabel](PhpLabel.md)
|
|
||||||
* [Prnt](Prnt.md)
|
|
||||||
* [Punct](Punct.md)
|
|
||||||
* [Regex](Regex.md)
|
|
||||||
* [ResourceType](ResourceType.md)
|
|
||||||
* [Slug](Slug.md)
|
|
||||||
* [Space](Space.md)
|
|
||||||
* [StartsWith](StartsWith.md)
|
|
||||||
* [Uppercase](Uppercase.md)
|
|
||||||
* [Version](Version.md)
|
|
||||||
* [Vowel](Vowel.md)
|
|
||||||
* [Xdigit](Xdigit.md)
|
|
||||||
|
|
||||||
## Arrays
|
|
||||||
|
|
||||||
* [ArrayVal](ArrayVal.md)
|
|
||||||
* [ArrayType](ArrayType.md)
|
|
||||||
* [Contains](Contains.md)
|
|
||||||
* [Each](Each.md)
|
|
||||||
* [EndsWith](EndsWith.md)
|
|
||||||
* [In](In.md)
|
|
||||||
* [Key](Key.md)
|
|
||||||
* [KeyNested](KeyNested.md)
|
|
||||||
* [KeySet](KeySet.md)
|
|
||||||
* [KeyValue](KeyValue.md)
|
|
||||||
* [Length](Length.md)
|
|
||||||
* [NotEmpty](NotEmpty.md)
|
|
||||||
* [StartsWith](StartsWith.md)
|
|
||||||
|
|
||||||
## Objects
|
|
||||||
|
|
||||||
* [Attribute](Attribute.md)
|
|
||||||
* [Instance](Instance.md)
|
|
||||||
* [Length](Length.md)
|
|
||||||
|
|
||||||
## Date and Time
|
|
||||||
|
|
||||||
* [Age](Age.md)
|
|
||||||
* [Between](Between.md)
|
|
||||||
* [Date](Date.md)
|
|
||||||
* [LeapDate](LeapDate.md)
|
|
||||||
* [LeapYear](LeapYear.md)
|
|
||||||
* [MinimumAge](MinimumAge.md)
|
|
||||||
|
|
||||||
## Group Validators
|
|
||||||
|
|
||||||
* [AllOf](AllOf.md)
|
|
||||||
* [NoneOf](NoneOf.md)
|
|
||||||
* [OneOf](OneOf.md)
|
|
||||||
|
|
||||||
## Regional
|
|
||||||
|
|
||||||
* [CountryCode](CountryCode.md)
|
|
||||||
* [CurrencyCode](CurrencyCode.md)
|
|
||||||
* [IdentityCard](IdentityCard.md)
|
|
||||||
* [LanguageCode](LanguageCode.md)
|
|
||||||
* [PostalCode](PostalCode.md)
|
|
||||||
* [SubdivisionCode](SubdivisionCode.md)
|
|
||||||
* [Tld](Tld.md)
|
|
||||||
|
|
||||||
## Files
|
|
||||||
|
|
||||||
* [Directory](Directory.md)
|
|
||||||
* [Executable](Executable.md)
|
|
||||||
* [Exists](Exists.md)
|
|
||||||
* [Extension](Extension.md)
|
|
||||||
* [File](File.md)
|
|
||||||
* [Image](Image.md)
|
|
||||||
* [Mimetype](Mimetype.md)
|
|
||||||
* [Readable](Readable.md)
|
|
||||||
* [Size](Size.md)
|
|
||||||
* [SymbolicLink](SymbolicLink.md)
|
|
||||||
* [Uploaded](Uploaded.md)
|
|
||||||
* [Writable](Writable.md)
|
|
||||||
|
|
||||||
## Banking
|
|
||||||
|
|
||||||
* [Bank](Bank.md)
|
|
||||||
* [BankAccount](BankAccount.md)
|
|
||||||
* [Bic](Bic.md)
|
|
||||||
|
|
||||||
## Other
|
|
||||||
|
|
||||||
* [Bsn](Bsn.md)
|
|
||||||
* [Cnh](Cnh.md)
|
|
||||||
* [Cnpj](Cnpj.md)
|
|
||||||
* [Cpf](Cpf.md)
|
|
||||||
* [Domain](Domain.md)
|
|
||||||
* [Email](Email.md)
|
|
||||||
* [HexRgbColor](HexRgbColor.md)
|
|
||||||
* [Imei](Imei.md)
|
|
||||||
* [Ip](Ip.md)
|
|
||||||
* [Json](Json.md)
|
|
||||||
* [MacAddress](MacAddress.md)
|
|
||||||
* [NfeAccessKey](NfeAccessKey.md)
|
|
||||||
* [NotBlank](NotBlank.md)
|
|
||||||
* [NotOptional](NotOptional.md)
|
|
||||||
* [Pesel](Pesel.md)
|
|
||||||
* [Phone](Phone.md)
|
|
||||||
* [Sf](Sf.md)
|
|
||||||
* [Url](Url.md)
|
|
||||||
* [VideoUrl](VideoUrl.md)
|
|
||||||
* [Zend](Zend.md)
|
|
||||||
|
|
||||||
## Yes/No
|
|
||||||
|
|
||||||
* [No](No.md)
|
|
||||||
* [Yes](Yes.md)
|
|
||||||
|
|
||||||
## Alphabetically
|
|
||||||
|
|
||||||
* [Age](Age.md)
|
|
||||||
* [AllOf](AllOf.md)
|
|
||||||
* [Alnum](Alnum.md)
|
|
||||||
* [Alpha](Alpha.md)
|
|
||||||
* [AlwaysInvalid](AlwaysInvalid.md)
|
|
||||||
* [AlwaysValid](AlwaysValid.md)
|
|
||||||
* [ArrayVal](ArrayVal.md)
|
|
||||||
* [ArrayType](ArrayType.md)
|
|
||||||
* [Attribute](Attribute.md)
|
|
||||||
* [Bank](Bank.md)
|
|
||||||
* [BankAccount](BankAccount.md)
|
|
||||||
* [Between](Between.md)
|
|
||||||
* [Bic](Bic.md)
|
|
||||||
* [BoolType](BoolType.md)
|
|
||||||
* [Bsn](Bsn.md)
|
|
||||||
* [Call](Call.md)
|
|
||||||
* [CallableType](CallableType.md)
|
|
||||||
* [Callback](Callback.md)
|
|
||||||
* [Charset](Charset.md)
|
|
||||||
* [Cnh](Cnh.md)
|
|
||||||
* [Cnpj](Cnpj.md)
|
|
||||||
* [Cntrl](Cntrl.md)
|
|
||||||
* [Consonant](Consonant.md)
|
|
||||||
* [Contains](Contains.md)
|
|
||||||
* [Countable](Countable.md)
|
|
||||||
* [CountryCode](CountryCode.md)
|
|
||||||
* [Cpf](Cpf.md)
|
|
||||||
* [CreditCard](CreditCard.md)
|
|
||||||
* [Date](Date.md)
|
|
||||||
* [Digit](Digit.md)
|
|
||||||
* [Directory](Directory.md)
|
|
||||||
* [Domain](Domain.md)
|
|
||||||
* [Each](Each.md)
|
|
||||||
* [Email](Email.md)
|
|
||||||
* [EndsWith](EndsWith.md)
|
|
||||||
* [Equals](Equals.md)
|
|
||||||
* [Even](Even.md)
|
|
||||||
* [Executable](Executable.md)
|
|
||||||
* [Exists](Exists.md)
|
|
||||||
* [Extension](Extension.md)
|
|
||||||
* [Factor](Factor.md)
|
|
||||||
* [FalseVal](FalseVal.md)
|
|
||||||
* [Fibonacci](Fibonacci.md)
|
|
||||||
* [File](File.md)
|
|
||||||
* [FilterVar](FilterVar.md)
|
|
||||||
* [Finite](Finite.md)
|
|
||||||
* [FloatVal](FloatVal.md)
|
|
||||||
* [FloatType](FloatType.md)
|
|
||||||
* [Graph](Graph.md)
|
|
||||||
* [HexRgbColor](HexRgbColor.md)
|
|
||||||
* [Identical](Identical.md)
|
|
||||||
* [IdentityCard](IdentityCard.md)
|
|
||||||
* [Image](Image.md)
|
|
||||||
* [Imei](Imei.md)
|
|
||||||
* [In](In.md)
|
|
||||||
* [Infinite](Infinite.md)
|
|
||||||
* [Instance](Instance.md)
|
|
||||||
* [IntVal](IntVal.md)
|
|
||||||
* [IntType](IntType.md)
|
|
||||||
* [Ip](Ip.md)
|
|
||||||
* [IterableType](IterableType.md)
|
|
||||||
* [Json](Json.md)
|
|
||||||
* [Key](Key.md)
|
|
||||||
* [KeyNested](KeyNested.md)
|
|
||||||
* [KeySet](KeySet.md)
|
|
||||||
* [KeyValue](KeyValue.md)
|
|
||||||
* [LanguageCode](LanguageCode.md)
|
|
||||||
* [LeapDate](LeapDate.md)
|
|
||||||
* [LeapYear](LeapYear.md)
|
|
||||||
* [Length](Length.md)
|
|
||||||
* [Lowercase](Lowercase.md)
|
|
||||||
* [MacAddress](MacAddress.md)
|
|
||||||
* [Max](Max.md)
|
|
||||||
* [Mimetype](Mimetype.md)
|
|
||||||
* [Min](Min.md)
|
|
||||||
* [MinimumAge](MinimumAge.md)
|
|
||||||
* [Multiple](Multiple.md)
|
|
||||||
* [Negative](Negative.md)
|
|
||||||
* [NfeAccessKey](NfeAccessKey.md)
|
|
||||||
* [No](No.md)
|
|
||||||
* [NoWhitespace](NoWhitespace.md)
|
|
||||||
* [NoneOf](NoneOf.md)
|
|
||||||
* [Not](Not.md)
|
|
||||||
* [NotBlank](NotBlank.md)
|
|
||||||
* [NotEmpty](NotEmpty.md)
|
|
||||||
* [NotOptional](NotOptional.md)
|
|
||||||
* [NullType](NullType.md)
|
|
||||||
* [Numeric](Numeric.md)
|
|
||||||
* [ObjectType](ObjectType.md)
|
|
||||||
* [Odd](Odd.md)
|
|
||||||
* [OneOf](OneOf.md)
|
|
||||||
* [Optional](Optional.md)
|
|
||||||
* [PerfectSquare](PerfectSquare.md)
|
|
||||||
* [Pesel](Pesel.md)
|
|
||||||
* [Phone](Phone.md)
|
|
||||||
* [PhpLabel](PhpLabel.md)
|
|
||||||
* [Positive](Positive.md)
|
|
||||||
* [PostalCode](PostalCode.md)
|
|
||||||
* [PrimeNumber](PrimeNumber.md)
|
|
||||||
* [Prnt](Prnt.md)
|
|
||||||
* [Punct](Punct.md)
|
|
||||||
* [Readable](Readable.md)
|
|
||||||
* [Regex](Regex.md)
|
|
||||||
* [ResourceType](ResourceType.md)
|
|
||||||
* [Roman](Roman.md)
|
|
||||||
* [ScalarVal](ScalarVal.md)
|
|
||||||
* [Sf](Sf.md)
|
|
||||||
* [Size](Size.md)
|
|
||||||
* [Slug](Slug.md)
|
|
||||||
* [Space](Space.md)
|
|
||||||
* [StartsWith](StartsWith.md)
|
|
||||||
* [StringType](StringType.md)
|
|
||||||
* [SubdivisionCode](SubdivisionCode.md)
|
|
||||||
* [SymbolicLink](SymbolicLink.md)
|
|
||||||
* [Tld](Tld.md)
|
|
||||||
* [TrueVal](TrueVal.md)
|
|
||||||
* [Type](Type.md)
|
|
||||||
* [Uploaded](Uploaded.md)
|
|
||||||
* [Uppercase](Uppercase.md)
|
|
||||||
* [Url](Url.md)
|
|
||||||
* [Version](Version.md)
|
|
||||||
* [VideoUrl](VideoUrl.md)
|
|
||||||
* [Vowel](Vowel.md)
|
|
||||||
* [When](When.md)
|
|
||||||
* [Writable](Writable.md)
|
|
||||||
* [Xdigit](Xdigit.md)
|
|
||||||
* [Yes](Yes.md)
|
|
||||||
* [Zend](Zend.md)
|
|
||||||
|
|
||||||
***
|
|
||||||
See also:
|
|
||||||
|
|
||||||
- [Contributing](../CONTRIBUTING.md)
|
|
||||||
- [Feature Guide](README.md)
|
|
||||||
- [Installation](INSTALL.md)
|
|
||||||
- [License](../LICENSE.md)
|
|
||||||
- [Changelog](../CHANGELOG.md)
|
|
|
@ -74,7 +74,7 @@ v::optional(v::alpha())->validate(null); // true
|
||||||
|
|
||||||
By _optional_ we consider `null` or an empty string (`''`).
|
By _optional_ we consider `null` or an empty string (`''`).
|
||||||
|
|
||||||
See more on [Optional](Optional.md).
|
See more on [Optional](rules/Optional.md).
|
||||||
|
|
||||||
## Negating rules
|
## Negating rules
|
||||||
|
|
||||||
|
@ -299,12 +299,3 @@ Message:
|
||||||
```no-highlight
|
```no-highlight
|
||||||
"really messed up screen#name" must contain only letters (a-z) and digits (0-9)
|
"really messed up screen#name" must contain only letters (a-z) and digits (0-9)
|
||||||
```
|
```
|
||||||
|
|
||||||
***
|
|
||||||
See also:
|
|
||||||
|
|
||||||
- [Contributing](../CONTRIBUTING.md)
|
|
||||||
- [Installation](INSTALL.md)
|
|
||||||
- [License](../LICENSE.md)
|
|
||||||
- [Validators](VALIDATORS.md)
|
|
||||||
- [Changelog](../CHANGELOG.md)
|
|
16
docs/index.md
Normal file
16
docs/index.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Overview
|
||||||
|
|
||||||
|
[![Build Status](https://img.shields.io/travis/Respect/Validation/master.svg?style=flat-square)](http://travis-ci.org/Respect/Validation)
|
||||||
|
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/Respect/Validation/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/Respect/Validation/?branch=master)
|
||||||
|
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Respect/Validation/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/Respect/Validation/?branch=master)
|
||||||
|
[![Latest Stable Version](https://img.shields.io/packagist/v/respect/validation.svg?style=flat-square)](https://packagist.org/packages/respect/validation)
|
||||||
|
[![Total Downloads](https://img.shields.io/packagist/dt/respect/validation.svg?style=flat-square)](https://packagist.org/packages/respect/validation)
|
||||||
|
[![License](https://img.shields.io/packagist/l/respect/validation.svg?style=flat-square)](https://packagist.org/packages/respect/validation)
|
||||||
|
|
||||||
|
[The most awesome validation engine ever created for PHP.](http://bit.ly/1a1oeQv)
|
||||||
|
|
||||||
|
- Complex rules made simple: `v::numeric()->positive()->between(1, 255)->validate($input)`.
|
||||||
|
- [Granularity control](feature-guide.md#validation-methods) for advanced reporting.
|
||||||
|
- More than 100 (fully tested) validators.
|
||||||
|
- [A concrete API](concrete-api.md) for non fluent usage.
|
||||||
|
- Works on PHP 5.4+ or HHVM 3.3+
|
|
@ -8,11 +8,3 @@ composer require respect/validation
|
||||||
```
|
```
|
||||||
|
|
||||||
[PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.3+ are required.
|
[PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.3+ are required.
|
||||||
|
|
||||||
***
|
|
||||||
See also:
|
|
||||||
|
|
||||||
- [Contributing](../CONTRIBUTING.md)
|
|
||||||
- [Feature Guide](README.md)
|
|
||||||
- [License](../LICENSE.md)
|
|
||||||
- [Validators](VALIDATORS.md)
|
|
30
docs/license.md
Normal file
30
docs/license.md
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# License
|
||||||
|
|
||||||
|
Copyright (c) 2009-2015, [Alexandre Gomes Gaigalas](http://github.com/alganet).
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Alexandre Gomes Gaigalas nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from this
|
||||||
|
software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
329
docs/list-of-rules.md
Normal file
329
docs/list-of-rules.md
Normal file
|
@ -0,0 +1,329 @@
|
||||||
|
# List of rules
|
||||||
|
|
||||||
|
## Types
|
||||||
|
|
||||||
|
* [ArrayVal](rules/ArrayVal.md)
|
||||||
|
* [ArrayType](rules/ArrayType.md)
|
||||||
|
* [BoolVal](rules/BoolVal.md)
|
||||||
|
* [BoolType](rules/BoolType.md)
|
||||||
|
* [CallableType](rules/CallableType.md)
|
||||||
|
* [Countable](rules/Countable.md)
|
||||||
|
* [Date](rules/Date.md)
|
||||||
|
* [FalseVal](rules/FalseVal.md)
|
||||||
|
* [FloatVal](rules/FloatVal.md)
|
||||||
|
* [FloatType](rules/FloatType.md)
|
||||||
|
* [Instance](rules/Instance.md)
|
||||||
|
* [IntVal](rules/IntVal.md)
|
||||||
|
* [IntType](rules/IntType.md)
|
||||||
|
* [IterableType](rules/IterableType.md)
|
||||||
|
* [NullType](rules/NullType.md)
|
||||||
|
* [Numeric](rules/Numeric.md)
|
||||||
|
* [ObjectType](rules/ObjectType.md)
|
||||||
|
* [ResourceType](rules/ResourceType.md)
|
||||||
|
* [ScalarVal](rules/ScalarVal.md)
|
||||||
|
* [StringType](rules/StringType.md)
|
||||||
|
* [TrueVal](rules/TrueVal.md)
|
||||||
|
* [Type](rules/Type.md)
|
||||||
|
* [Xdigit](rules/Xdigit.md)
|
||||||
|
|
||||||
|
## Generics
|
||||||
|
|
||||||
|
* [AlwaysInvalid](rules/AlwaysInvalid.md)
|
||||||
|
* [AlwaysValid](rules/AlwaysValid.md)
|
||||||
|
* [Call](rules/Call.md)
|
||||||
|
* [Callback](rules/Callback.md)
|
||||||
|
* [FilterVar](rules/FilterVar.md)
|
||||||
|
* [Not](rules/Not.md)
|
||||||
|
* [Optional](rules/Optional.md)
|
||||||
|
* [Type](rules/Type.md)
|
||||||
|
* [When](rules/When.md)
|
||||||
|
|
||||||
|
## Comparing Values
|
||||||
|
|
||||||
|
* [Age](rules/Age.md)
|
||||||
|
* [Between](rules/Between.md)
|
||||||
|
* [Equals](rules/Equals.md)
|
||||||
|
* [Identical](rules/Identical.md)
|
||||||
|
* [Max](rules/Max.md)
|
||||||
|
* [Min](rules/Min.md)
|
||||||
|
|
||||||
|
## Numeric
|
||||||
|
|
||||||
|
* [Between](rules/Between.md)
|
||||||
|
* [BoolType](rules/BoolType.md)
|
||||||
|
* [Even](rules/Even.md)
|
||||||
|
* [Factor](rules/Factor.md)
|
||||||
|
* [Fibonacci](rules/Fibonacci.md)
|
||||||
|
* [Finite](rules/Finite.md)
|
||||||
|
* [FloatVal](rules/FloatVal.md)
|
||||||
|
* [FloatType](rules/FloatType.md)
|
||||||
|
* [Infinite](rules/Infinite.md)
|
||||||
|
* [IntVal](rules/IntVal.md)
|
||||||
|
* [IntType](rules/IntType.md)
|
||||||
|
* [Multiple](rules/Multiple.md)
|
||||||
|
* [Negative](rules/Negative.md)
|
||||||
|
* [NotEmpty](rules/NotEmpty.md)
|
||||||
|
* [Numeric](rules/Numeric.md)
|
||||||
|
* [Odd](rules/Odd.md)
|
||||||
|
* [PerfectSquare](rules/PerfectSquare.md)
|
||||||
|
* [Positive](rules/Positive.md)
|
||||||
|
* [PrimeNumber](rules/PrimeNumber.md)
|
||||||
|
* [Roman](rules/Roman.md)
|
||||||
|
* [Xdigit](rules/Xdigit.md)
|
||||||
|
|
||||||
|
## String
|
||||||
|
|
||||||
|
* [Alnum](rules/Alnum.md)
|
||||||
|
* [Alpha](rules/Alpha.md)
|
||||||
|
* [Between](rules/Between.md)
|
||||||
|
* [Charset](rules/Charset.md)
|
||||||
|
* [Cntrl](rules/Cntrl.md)
|
||||||
|
* [Consonant](rules/Consonant.md)
|
||||||
|
* [Contains](rules/Contains.md)
|
||||||
|
* [Digit](rules/Digit.md)
|
||||||
|
* [EndsWith](rules/EndsWith.md)
|
||||||
|
* [Graph](rules/Graph.md)
|
||||||
|
* [In](rules/In.md)
|
||||||
|
* [Length](rules/Length.md)
|
||||||
|
* [Lowercase](rules/Lowercase.md)
|
||||||
|
* [NotEmpty](rules/NotEmpty.md)
|
||||||
|
* [NoWhitespace](rules/NoWhitespace.md)
|
||||||
|
* [PhpLabel](rules/PhpLabel.md)
|
||||||
|
* [Prnt](rules/Prnt.md)
|
||||||
|
* [Punct](rules/Punct.md)
|
||||||
|
* [Regex](rules/Regex.md)
|
||||||
|
* [ResourceType](rules/ResourceType.md)
|
||||||
|
* [Slug](rules/Slug.md)
|
||||||
|
* [Space](rules/Space.md)
|
||||||
|
* [StartsWith](rules/StartsWith.md)
|
||||||
|
* [Uppercase](rules/Uppercase.md)
|
||||||
|
* [Version](rules/Version.md)
|
||||||
|
* [Vowel](rules/Vowel.md)
|
||||||
|
* [Xdigit](rules/Xdigit.md)
|
||||||
|
|
||||||
|
## Arrays
|
||||||
|
|
||||||
|
* [ArrayVal](rules/ArrayVal.md)
|
||||||
|
* [ArrayType](rules/ArrayType.md)
|
||||||
|
* [Contains](rules/Contains.md)
|
||||||
|
* [Each](rules/Each.md)
|
||||||
|
* [EndsWith](rules/EndsWith.md)
|
||||||
|
* [In](rules/In.md)
|
||||||
|
* [Key](rules/Key.md)
|
||||||
|
* [KeyNested](rules/KeyNested.md)
|
||||||
|
* [KeySet](rules/KeySet.md)
|
||||||
|
* [KeyValue](rules/KeyValue.md)
|
||||||
|
* [Length](rules/Length.md)
|
||||||
|
* [NotEmpty](rules/NotEmpty.md)
|
||||||
|
* [StartsWith](rules/StartsWith.md)
|
||||||
|
|
||||||
|
## Objects
|
||||||
|
|
||||||
|
* [Attribute](rules/Attribute.md)
|
||||||
|
* [Instance](rules/Instance.md)
|
||||||
|
* [Length](rules/Length.md)
|
||||||
|
|
||||||
|
## Date and Time
|
||||||
|
|
||||||
|
* [Age](rules/Age.md)
|
||||||
|
* [Between](rules/Between.md)
|
||||||
|
* [Date](rules/Date.md)
|
||||||
|
* [LeapDate](rules/LeapDate.md)
|
||||||
|
* [LeapYear](rules/LeapYear.md)
|
||||||
|
* [MinimumAge](rules/MinimumAge.md)
|
||||||
|
|
||||||
|
## Group Validators
|
||||||
|
|
||||||
|
* [AllOf](rules/AllOf.md)
|
||||||
|
* [NoneOf](rules/NoneOf.md)
|
||||||
|
* [OneOf](rules/OneOf.md)
|
||||||
|
|
||||||
|
## Regional
|
||||||
|
|
||||||
|
* [CountryCode](rules/CountryCode.md)
|
||||||
|
* [CurrencyCode](rules/CurrencyCode.md)
|
||||||
|
* [IdentityCard](rules/IdentityCard.md)
|
||||||
|
* [LanguageCode](rules/LanguageCode.md)
|
||||||
|
* [PostalCode](rules/PostalCode.md)
|
||||||
|
* [SubdivisionCode](rules/SubdivisionCode.md)
|
||||||
|
* [Tld](rules/Tld.md)
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
* [Directory](rules/Directory.md)
|
||||||
|
* [Executable](rules/Executable.md)
|
||||||
|
* [Exists](rules/Exists.md)
|
||||||
|
* [Extension](rules/Extension.md)
|
||||||
|
* [File](rules/File.md)
|
||||||
|
* [Image](rules/Image.md)
|
||||||
|
* [Mimetype](rules/Mimetype.md)
|
||||||
|
* [Readable](rules/Readable.md)
|
||||||
|
* [Size](rules/Size.md)
|
||||||
|
* [SymbolicLink](rules/SymbolicLink.md)
|
||||||
|
* [Uploaded](rules/Uploaded.md)
|
||||||
|
* [Writable](rules/Writable.md)
|
||||||
|
|
||||||
|
## Banking
|
||||||
|
|
||||||
|
* [Bank](rules/Bank.md)
|
||||||
|
* [BankAccount](rules/BankAccount.md)
|
||||||
|
* [Bic](rules/Bic.md)
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
* [Bsn](rules/Bsn.md)
|
||||||
|
* [Cnh](rules/Cnh.md)
|
||||||
|
* [Cnpj](rules/Cnpj.md)
|
||||||
|
* [Cpf](rules/Cpf.md)
|
||||||
|
* [Domain](rules/Domain.md)
|
||||||
|
* [Email](rules/Email.md)
|
||||||
|
* [HexRgbColor](rules/HexRgbColor.md)
|
||||||
|
* [Imei](rules/Imei.md)
|
||||||
|
* [Ip](rules/Ip.md)
|
||||||
|
* [Json](rules/Json.md)
|
||||||
|
* [MacAddress](rules/MacAddress.md)
|
||||||
|
* [NfeAccessKey](rules/NfeAccessKey.md)
|
||||||
|
* [NotBlank](rules/NotBlank.md)
|
||||||
|
* [NotOptional](rules/NotOptional.md)
|
||||||
|
* [Pesel](rules/Pesel.md)
|
||||||
|
* [Phone](rules/Phone.md)
|
||||||
|
* [Sf](rules/Sf.md)
|
||||||
|
* [Url](rules/Url.md)
|
||||||
|
* [VideoUrl](rules/VideoUrl.md)
|
||||||
|
* [Zend](rules/Zend.md)
|
||||||
|
|
||||||
|
## Yes/No
|
||||||
|
|
||||||
|
* [No](rules/No.md)
|
||||||
|
* [Yes](rules/Yes.md)
|
||||||
|
|
||||||
|
## Alphabetically
|
||||||
|
|
||||||
|
* [Age](rules/Age.md)
|
||||||
|
* [AllOf](rules/AllOf.md)
|
||||||
|
* [Alnum](rules/Alnum.md)
|
||||||
|
* [Alpha](rules/Alpha.md)
|
||||||
|
* [AlwaysInvalid](rules/AlwaysInvalid.md)
|
||||||
|
* [AlwaysValid](rules/AlwaysValid.md)
|
||||||
|
* [ArrayVal](rules/ArrayVal.md)
|
||||||
|
* [ArrayType](rules/ArrayType.md)
|
||||||
|
* [Attribute](rules/Attribute.md)
|
||||||
|
* [Bank](rules/Bank.md)
|
||||||
|
* [BankAccount](rules/BankAccount.md)
|
||||||
|
* [Between](rules/Between.md)
|
||||||
|
* [Bic](rules/Bic.md)
|
||||||
|
* [BoolType](rules/BoolType.md)
|
||||||
|
* [Bsn](rules/Bsn.md)
|
||||||
|
* [Call](rules/Call.md)
|
||||||
|
* [CallableType](rules/CallableType.md)
|
||||||
|
* [Callback](rules/Callback.md)
|
||||||
|
* [Charset](rules/Charset.md)
|
||||||
|
* [Cnh](rules/Cnh.md)
|
||||||
|
* [Cnpj](rules/Cnpj.md)
|
||||||
|
* [Cntrl](rules/Cntrl.md)
|
||||||
|
* [Consonant](rules/Consonant.md)
|
||||||
|
* [Contains](rules/Contains.md)
|
||||||
|
* [Countable](rules/Countable.md)
|
||||||
|
* [CountryCode](rules/CountryCode.md)
|
||||||
|
* [Cpf](rules/Cpf.md)
|
||||||
|
* [CreditCard](rules/CreditCard.md)
|
||||||
|
* [Date](rules/Date.md)
|
||||||
|
* [Digit](rules/Digit.md)
|
||||||
|
* [Directory](rules/Directory.md)
|
||||||
|
* [Domain](rules/Domain.md)
|
||||||
|
* [Each](rules/Each.md)
|
||||||
|
* [Email](rules/Email.md)
|
||||||
|
* [EndsWith](rules/EndsWith.md)
|
||||||
|
* [Equals](rules/Equals.md)
|
||||||
|
* [Even](rules/Even.md)
|
||||||
|
* [Executable](rules/Executable.md)
|
||||||
|
* [Exists](rules/Exists.md)
|
||||||
|
* [Extension](rules/Extension.md)
|
||||||
|
* [Factor](rules/Factor.md)
|
||||||
|
* [FalseVal](rules/FalseVal.md)
|
||||||
|
* [Fibonacci](rules/Fibonacci.md)
|
||||||
|
* [File](rules/File.md)
|
||||||
|
* [FilterVar](rules/FilterVar.md)
|
||||||
|
* [Finite](rules/Finite.md)
|
||||||
|
* [FloatVal](rules/FloatVal.md)
|
||||||
|
* [FloatType](rules/FloatType.md)
|
||||||
|
* [Graph](rules/Graph.md)
|
||||||
|
* [HexRgbColor](rules/HexRgbColor.md)
|
||||||
|
* [Identical](rules/Identical.md)
|
||||||
|
* [IdentityCard](rules/IdentityCard.md)
|
||||||
|
* [Image](rules/Image.md)
|
||||||
|
* [Imei](rules/Imei.md)
|
||||||
|
* [In](rules/In.md)
|
||||||
|
* [Infinite](rules/Infinite.md)
|
||||||
|
* [Instance](rules/Instance.md)
|
||||||
|
* [IntVal](rules/IntVal.md)
|
||||||
|
* [IntType](rules/IntType.md)
|
||||||
|
* [Ip](rules/Ip.md)
|
||||||
|
* [IterableType](rules/IterableType.md)
|
||||||
|
* [Json](rules/Json.md)
|
||||||
|
* [Key](rules/Key.md)
|
||||||
|
* [KeyNested](rules/KeyNested.md)
|
||||||
|
* [KeySet](rules/KeySet.md)
|
||||||
|
* [KeyValue](rules/KeyValue.md)
|
||||||
|
* [LanguageCode](rules/LanguageCode.md)
|
||||||
|
* [LeapDate](rules/LeapDate.md)
|
||||||
|
* [LeapYear](rules/LeapYear.md)
|
||||||
|
* [Length](rules/Length.md)
|
||||||
|
* [Lowercase](rules/Lowercase.md)
|
||||||
|
* [MacAddress](rules/MacAddress.md)
|
||||||
|
* [Max](rules/Max.md)
|
||||||
|
* [Mimetype](rules/Mimetype.md)
|
||||||
|
* [Min](rules/Min.md)
|
||||||
|
* [MinimumAge](rules/MinimumAge.md)
|
||||||
|
* [Multiple](rules/Multiple.md)
|
||||||
|
* [Negative](rules/Negative.md)
|
||||||
|
* [NfeAccessKey](rules/NfeAccessKey.md)
|
||||||
|
* [No](rules/No.md)
|
||||||
|
* [NoWhitespace](rules/NoWhitespace.md)
|
||||||
|
* [NoneOf](rules/NoneOf.md)
|
||||||
|
* [Not](rules/Not.md)
|
||||||
|
* [NotBlank](rules/NotBlank.md)
|
||||||
|
* [NotEmpty](rules/NotEmpty.md)
|
||||||
|
* [NotOptional](rules/NotOptional.md)
|
||||||
|
* [NullType](rules/NullType.md)
|
||||||
|
* [Numeric](rules/Numeric.md)
|
||||||
|
* [ObjectType](rules/ObjectType.md)
|
||||||
|
* [Odd](rules/Odd.md)
|
||||||
|
* [OneOf](rules/OneOf.md)
|
||||||
|
* [Optional](rules/Optional.md)
|
||||||
|
* [PerfectSquare](rules/PerfectSquare.md)
|
||||||
|
* [Pesel](rules/Pesel.md)
|
||||||
|
* [Phone](rules/Phone.md)
|
||||||
|
* [PhpLabel](rules/PhpLabel.md)
|
||||||
|
* [Positive](rules/Positive.md)
|
||||||
|
* [PostalCode](rules/PostalCode.md)
|
||||||
|
* [PrimeNumber](rules/PrimeNumber.md)
|
||||||
|
* [Prnt](rules/Prnt.md)
|
||||||
|
* [Punct](rules/Punct.md)
|
||||||
|
* [Readable](rules/Readable.md)
|
||||||
|
* [Regex](rules/Regex.md)
|
||||||
|
* [ResourceType](rules/ResourceType.md)
|
||||||
|
* [Roman](rules/Roman.md)
|
||||||
|
* [ScalarVal](rules/ScalarVal.md)
|
||||||
|
* [Sf](rules/Sf.md)
|
||||||
|
* [Size](rules/Size.md)
|
||||||
|
* [Slug](rules/Slug.md)
|
||||||
|
* [Space](rules/Space.md)
|
||||||
|
* [StartsWith](rules/StartsWith.md)
|
||||||
|
* [StringType](rules/StringType.md)
|
||||||
|
* [SubdivisionCode](rules/SubdivisionCode.md)
|
||||||
|
* [SymbolicLink](rules/SymbolicLink.md)
|
||||||
|
* [Tld](rules/Tld.md)
|
||||||
|
* [TrueVal](rules/TrueVal.md)
|
||||||
|
* [Type](rules/Type.md)
|
||||||
|
* [Uploaded](rules/Uploaded.md)
|
||||||
|
* [Uppercase](rules/Uppercase.md)
|
||||||
|
* [Url](rules/Url.md)
|
||||||
|
* [Version](rules/Version.md)
|
||||||
|
* [VideoUrl](rules/VideoUrl.md)
|
||||||
|
* [Vowel](rules/Vowel.md)
|
||||||
|
* [When](rules/When.md)
|
||||||
|
* [Writable](rules/Writable.md)
|
||||||
|
* [Xdigit](rules/Xdigit.md)
|
||||||
|
* [Yes](rules/Yes.md)
|
||||||
|
* [Zend](rules/Zend.md)
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue