Commit graph

286 commits

Author SHA1 Message Date
Henrique Moody
e20ddce185 Create "Url" rule 2015-01-27 10:43:00 -02:00
Henrique Moody
a0e7e834fb Create "FilterVar" rule 2015-01-26 11:25:26 -02:00
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
57d82ce029 Merge branch '0.7' 2015-01-19 21:09:47 -02:00
Henrique Moody
fb54341fb2 Fix wrong behavior when calling not() rule 2015-01-19 20:22:58 -02:00
Henrique Moody
35588c5340 Allow to use when() rule without else 2015-01-19 12:10:50 -02:00
Henrique Moody
eb3b8313aa Move tests files 2015-01-19 11:01:00 -02:00
Henrique Moody
16005ae9d4 Refactoring on banking rules 2015-01-18 13:39:41 -02:00
Henrique Moody
4f74d2940c Create locale factory class 2015-01-18 13:39:41 -02:00
Henrique Moody
67fe0b6443 Create german bank rules 2015-01-18 13:39:41 -02:00
Henrique Moody
c2f3f162fe Create AbstractWrapper class 2015-01-18 12:33:29 -02:00
Henrique Moody
bb2664e0e4 Merge pull request #252 from henriquemoody/unit-tests
Remove unnecessary checkings on unit tests
2015-01-18 12:33:13 -02:00
Henrique Moody
8b6701facf Remove unused file 2015-01-17 17:24:41 -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
3add4de055 Fix some standards on bank rules 2015-01-17 13:00:18 -02:00
Henrique Moody
f2285f6b53 Improve tests of banking rules 2015-01-17 12:23:46 -02:00
Henrique Moody
26e8d76d8c Merge branch '0.7' 2015-01-14 20:02:11 -02:00
Alexandre Gaigalas
a8d1c94962 Remove support for undocumented baseXX() shortcut
Previously undocumented, this feature is now removed to improve
each chain call.
2015-01-14 19:27:06 -02:00
Alexandre Gaigalas
ecd2cc9931 Update PrntTest to use chr() as provider argument
On Windows machines, \t produces a pritable character, thus making
the tests incompatible between systems.
2015-01-14 19:23:52 -02:00
Markus Malkusch
623a26235e Added bank(), bankAccount() and bic(). Currently only German. 2015-01-14 21:17:04 +01: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
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
3e89ee385f Always define names for children in composite rules 2015-01-05 12:47:32 -02:00
Henrique Moody
ba064eb400 Merge pull request #231 from henriquemoody/setName
Define names for children in composite rules
2015-01-03 14:40:28 -02:00
Henrique Moody
e836b22210 Define names for children in composite rules 2015-01-03 14:18:20 -02:00
Róbert Nagy
14d65f47ea Allow support for IDN with subdomains
I just moved the IDN rule from checks array to otherParts validation,
because the old approach did not supported an IDN with subdomain.
2015-01-03 12:29:52 -02:00
Henrique Moody
0ffd74f7bb Merge pull request #183 from henriquemoody/callback
Allow to define arguments of callback
2015-01-02 19:18:25 -02:00
Henrique Moody
02b9417473 Merge pull request #226 from henriquemoody/postalcode
Create PostalCode rule
2015-01-02 19:08:55 -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
2cfc96003d Add missing exceptions
Also creates a test to check it every rule has an exception.
2015-01-02 17:25:01 -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
e2950e6a51 Create Executable rule 2014-11-10 16:36:12 -02:00
Henrique Moody
64d069fd5b Allow to define arguments of callback 2014-11-10 16:34:08 -02:00
romeo
2ee85d801b Fixed test. 2014-10-17 22:22:12 +04:00
romeo
e5deb5f72a Added test PR #214. 2014-10-17 22:09:25 +04:00
romeo
909b242124 Added test PR #214. 2014-10-17 21:56:52 +04:00
Wesley Victhor Mendes Santiago
6ee3c40ab6 Merge pull request #210 from osiux/issue-187
7 digits phone numbers should be valid.
2014-10-06 19:04:28 -03:00
Eduardo Reveles
00940cfee9 Translate date formats to something DateTime::createFromFormat can understand. 2014-10-01 01:09:27 -05:00
Eduardo Reveles
f1777de330 7 digits phone numbers should be valid. 2014-10-01 00:36:28 -05:00
Alexandre Gaigalas
0ca64fa83b Fixing tests/bootstrap.php for #182 2014-07-14 11:04:38 -03:00
Henrique Oliveira
c84d9a21a9 Fixed Phone Ninth digit validation for Brazilian phone numbers 2014-04-26 23:32:56 -03: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
Augusto Pascutti
9acc778a8c Merge pull request #151 from leonnleite/develop
Add missing CNPJException
2014-02-19 23:01:38 -03:00
root
61f8cc25ae updating tests to testing when the missing cnpjException file 2014-02-19 22:34:01 -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
Augusto Pascutti
87397f9125 Merge pull request #146 from augustohp/139-Broken_sf_rule
Fix 139: Broken `sf` (Symfony) rule
2014-02-16 18:30:09 -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