Commit graph

87 commits

Author SHA1 Message Date
Henrique Moody 81cfba9a6c Merge pull request #247 from henriquemoody/when
Allow to use `when()` rule without else
2015-01-23 02:53:21 -02:00
Henrique Moody 8b369fae97 Create "False" rule 2015-01-23 02:46:18 -02:00
Henrique Moody dfcd4b2a20 Create "True" rule 2015-01-23 02:46:07 -02:00
Henrique Moody 35588c5340 Allow to use when() rule without else 2015-01-19 12:10:50 -02:00
Henrique Moody b0816ab36f Remove unnecessary checkings on unit tests
Since we are using only composer as autoloader and we have all
dependencies on `require-dev` there is no need to check if third-party
libraries are present or not
2015-01-17 17:04:05 -02:00
Henrique Moody 95b5325c13 Fix wrong postalCode() documentation 2015-01-16 17:20:17 -02:00
Markus Malkusch 623a26235e Added bank(), bankAccount() and bic(). Currently only German. 2015-01-14 21:17:04 +01:00
Alexandre Gomes Gaigalas 97058a2c07 Changes in the README intro
- Added info about non-fluent API usage.
  - Changed feature bullet points and text.
2015-01-11 19:54:38 -02:00
Henrique Moody f56806159c Use shilds of shields.io 2015-01-07 16:02:59 -02:00
Henrique Moody 2b97bbba22 Update PHPUnit settings
- Move "tests/phpunit.xml" to "phpunit.xml.dist"
- Update documentation and contributing documents
- Update Travis settings
- Add "phpunit.xml" in the Git ignore list
2015-01-07 16:02:58 -02:00
Henrique Moody bfbfe8aced Remove PEAR support 2015-01-07 16:02:51 -02:00
Henrique Moody b5d3ff63ee Create Yes/No rules 2015-01-06 20:46:16 -02:00
davidepastore 960732d26c Create HexRgbColor rule 2015-01-06 13:42:53 -02:00
Henrique Moody df8f10f4ea Create PostalCode rule
Thanks @xthiago (Thiago Rodrigues) for the initial idea.
2015-01-02 18:56:34 -02:00
Henrique Moody 4b9411d6ba Fix typo in JSON rule documentation 2015-01-02 16:49:49 -02:00
Henrique Moody 0171f02c2c Merge pull request #207 from henriquemoody/Executable
Create Executable rule
2015-01-02 16:44:14 -02:00
Henrique Moody fe4a93ddb0 Merge pull request #220 from CommandZ-io/master
Updated Domain and Mac Address docs.
2015-01-02 16:13:52 -02:00
Henrique Moody 6a5e414035 Merge pull request #218 from jarrettchisholm/master
Fixed v::min documentation
2015-01-02 16:10:14 -02:00
Henrique Moody b8d804817f Merge pull request #221 from bmorg/typo-fix
Fixed a typo / missing word.
2015-01-02 16:09:42 -02:00
Ricardo Seromenho 14dce04865 Fix v::length $inclusive default on Readme #217 2014-12-29 00:31:06 +00:00
Bernhard Morgenstern 70a4d07f8c Fixed a typo / missing word. 2014-12-14 17:11:45 +01:00
Andy Wendt 9944ae8054 Updated Domain and Mac Address docs.
Domain validator incorrectly stated that an ip would validate.  See `Respect\Validation\Rules\DomainTest`

Added second valid Mac Address format demonstration using `-`.  See `Respect\Validation\Rules\MacAddressTest`
2014-12-13 16:56:50 -07:00
Jarrett Chisholm 0b3d7c4b9d - fixed links
- added 2 more v::max() examples
2014-12-04 14:38:23 -05:00
Jarrett Chisholm 564922e6eb - fixed min/max documentation 2014-12-04 14:35:36 -05:00
Henrique Moody e2950e6a51 Create Executable rule 2014-11-10 16:36:12 -02:00
Wesley Victhor Mendes Santiago 4f5bd8eaf6 Merge pull request #201 from elazar/patch-1
Fixed Exception class in "Informative Exceptions"
2014-10-07 12:10:19 -03:00
Davide Pastore 40a7b1e7ba Add Test section in README.md
Use <project folder>, add the "$" symbol, remove the configuration of phpunit, add composer download and installation of dependencies.
2014-08-04 09:40:03 +02:00
Matthew Turland a379977b2c Fixed Exception class in "Informative Exceptions"
The example in the "Informative Exceptions" section uses InvalidArgumentException, which is incorrect as that class does not have a getFullMessage() method. The class that defines getFullMessage() is AbstractNestedException, of which DomainException is a subclass, so I've replaced InvalidArgumentException with that to make the example accurate.
2014-07-25 09:22:47 -05:00
Jefersson Nathan 2ce3685b20 Links of rules on README.
All references to rules inside the README now have
a link to the corresponding section into the documentation.

Fixes #190 on GitHub.
2014-07-15 04:07:17 +00:00
Augusto Pascutti b0eb1284b8 Add scrutinizer badges to README.
Also removes the unstable build badge, which is kind of redundant since
we will always respect the pattern of keeping the `master` branch stable
enough to be used.

Two Scrutinizer badges were added: code coverage and code quality.

Travis changed to report code coverage to Scrutinizer.
2014-07-11 03:26:03 -03:00
Nick Lombard 8223931d05 Removed <?php as it is not required anymore. 2014-04-18 12:04:38 +02:00
Nick Lombard d2ffd8e8b6 Merge pull request #162 from GypsyCodex/highlight-readme-code
Add Syntax Highlighting in README.md
2014-04-18 12:03:18 +02:00
Davide Pastore be6eaf733f Add Syntax Highlighting in README.md 2014-04-12 16:59:10 +02:00
Davide Pastore 4dfc77790c Little typo 2014-04-09 10:05:15 +02:00
Augusto Pascutti 979c06997b Merge pull request #148 from augustohp/develop
Allow internationalized domains and skip TLD check.
2014-02-19 23:20:33 -03:00
Mehmet Tolga Avcioglu d12787cb9e Domain rules now can skip TLD checks and accepts IDNA.
Skipping TLD check allows for local domains like "machine.dev",
but the default behavior of the rule still the same: it validates
TLDs, so domains will only be valid (by default) if the TLD is a
valid one.

The signature of rule (using the builder) changes from:

    v::domain() // Still works, same behavior as before.

To:

    v::domain(false) // Skips TLD check.

Fix #33.

The "Domain" rule now validates domains on "ASCII Compatible Encoding"
[ACE][1] for internationalized domain names (ICANN, 2003).

An excerpt from Wikipedia article:

> If given a label containing at least one non-ASCII character, ToASCII
> will apply the Nameprep algorithm, which converts the label to
> lowercase and performs other normalization, and will then translate the
> result to ASCII using [Punycode][16] before prepending the four-character
> string ["xn--"][17].

[1]: http://wikipedia.org/wiki/Internationalized_domain_name#ToASCII_and_ToUnicode
[16]: http://tools.ietf.org/html/rfc3492
[17]: http://www.atm.tut.fi/list-archive/ietf-announce/msg13572.html
2014-02-16 21:29:23 -03:00
Logan H Kennedy a73f9d8595 Fix grammar error on README.md.
Fix phrase "given data is a file (that) was uploaded" on `uploaded`
validation rule.
2014-02-16 21:00:13 -03:00
Andrey Knupp Vital 917176222c Adds NFeAccessKey validation rule.
Relevant just to Brazil, this rule validates NFe access key.
2014-02-16 16:48:51 -03:00
Augusto Pascutti 159213b731 Updates README introduction.
With the discussion on reddit about Respect/Validation being the most
awesome validation engine and also with a more accurate number of
current rules.
2014-02-16 03:17:13 -03:00
Nick Lombard a6917b5914 Moved badges to fit screen width 2014-01-29 03:34:15 +02:00
Nick Lombard 7de50ba122 Added some packagist bling
poser badges as provided by https://poser.pugx.org/
2014-01-29 03:25:59 +02:00
mf 10990b7751 Updated documentation and unit tests for phone validation 2013-04-28 23:29:09 -04:00
Pascal Borreli 2776a405cb Fixed typos 2013-02-25 23:15:23 +00:00
Henrique Moody 3f41cf6058 Created rule "Uploaded"
This rule checks if the given data is a file was uploaded via HTTP POST.
2013-02-04 22:57:35 -02:00
Henrique Moody 48a9fad2c2 Created rule "Writable".
This rule checks if the given data is a file exists and is writable.
2013-02-04 22:54:46 -02:00
Henrique Moody 7a6fb85b46 Created rule "Readable".
This rule checks if the given data is a file exists and is readable.
2013-02-04 22:51:45 -02:00
Henrique Moody daf660502a Created rule "SymbolicLink"
This rule checks if the given data is a path of a valid symbolic link.
2013-02-04 22:48:21 -02:00
Henrique Moody fa641ef175 Created rule "Exists"
This rule checks if the given data is a path of a regular file or
directory.
2013-02-04 22:10:36 -02:00
Henrique Moody 879f08aad1 Created rule "File"
This rule checks if the given data is a path of a regular file or not.
2013-02-04 22:03:54 -02:00
nickl- 00f6a5bacc Update documentation explain all values optional 2013-01-25 05:20:14 +02:00