Commit graph

468 commits

Author SHA1 Message Date
Henrique Moody 3fbc45d44f Add country code to postal code exception message 2015-09-24 00:49:25 -03:00
Henrique Moody 9ab672d489 Fix bugs on "SubdivisionCode" rule
The last commit was a cherry-pick from a long time ago, so the test was
into a different repository which could not be seen by PHPUnit. I moved
the tests and them I could see that the rule had some bugs and wrong
exception messages.
2015-09-22 10:08:17 -03:00
Ricardo Gobbo a026124590 Create "VideoUrl" rule 2015-09-15 23:41:24 -03:00
Henrique Moody 13454e3f6a Use filter_var() on "True" and "False" rules 2015-09-11 14:20:46 -03:00
Henrique Moody 62d8909928 Some small coding standard fixes 2015-09-11 02:59:11 -03:00
Henrique Moody 5a41a6bf0c Make exception messages simpler
When the exception has only one related exception, there is no need to
display it's messages unless it has an user-defined template.
2015-09-11 02:49:42 -03:00
David Meister f14e53921c Create "Factor" rule 2015-09-10 13:44:00 -03:00
Henrique Moody 748b280c34 Update conversion to strings on exceptions
Many changes were made on `ValidationException::stringify`:
- Add support for instances of `Exception`;
- Add support for instances of `Traversable`;
- Add support for resources;
- Improve `Array` conversion;
- Improve `Object` conversion;
- Improve conversion of all values by using JSON.

Now, all the parameters of the exception classes are just converted to
string when replacing parameters on exceptions, so the exception classes
now keep the original value of all parameters.
2015-09-04 17:11:40 -03:00
Henrique Moody 8faed71a05 The finfo::file() accepts only valid files 2015-08-26 19:46:51 -03:00
Henrique Moody 77b046f907 Create "CallableType" rule 2015-08-20 01:29:00 -03:00
Henrique Moody ea71de5812 Create "Scalar" rule 2015-08-20 01:28:59 -03:00
Henrique Moody 954c257fc9 Create "Resource" rule 2015-08-20 01:28:59 -03:00
Henrique Moody a7aa5f8ec0 Create "Infinite" rule 2015-08-20 01:28:59 -03:00
Henrique Moody c80ed1bb85 Create "Finite" rule 2015-08-20 01:28:56 -03:00
Henrique Moody 75b406c240 Missing @group rule on locale rules 2015-08-16 15:07:15 -03:00
Henrique Moody 757c3776af Add @covers and @group rule on rule tests 2015-08-16 15:00:05 -03:00
Andy Wendt 007e37b570 Removed all deprecated rules
Also their exceptions and tests. Removed the class names from the
`$deprecateds[]` in `CheckExceptionsTest`.
2015-08-13 04:40:17 -03:00
Henrique Moody 02a1923eb5 Move unit tests to "tests/unit" 2015-08-11 13:36:25 -03:00