Commit graph

171 commits

Author SHA1 Message Date
Carlos André Ferrari
f2c723f869 Added Base validator
This validator is made to validate numbers in any base, even with custom bases

It also have a shortcut, you can use something like
v::base3()->assert('0212');
instead of
v::base(3)->assert('0212');

You can also use custom numeric sequences, like
v::base(3, 'xy')->assert('xyxyx');
2012-07-22 10:17:31 -03:00
Alexandre Gaigalas
dedb7da7c0 Added AlwaysValid and AlwaysInvalid validators for mocking and testing purpouses 2012-05-24 12:07:29 -03:00
Alexandre Gaigalas
2c67ed148d Added CountryCode Validator 2012-05-24 12:00:18 -03:00
Alexandre Gaigalas
90d370b8a6 Another try to fix not() shortcuts 2012-05-17 16:16:45 -03:00
Alexandre Gaigalas
deedd3dddc Possible fix for #74 2012-05-17 15:51:49 -03:00
Vicente Mendoza
c9f0c05f57 add shorcuts not and addOr 2012-05-05 19:06:13 -05:00
Alexandre Gaigalas
e89e1df630 Fixed bug with date formats 2012-04-24 23:52:37 -03:00
Henrique Moody
64588c3ef8 Fixed directory test error in PHP 5.4 2012-04-11 16:08:57 -03:00
Henrique Moody
d560c601b8 Created rule for directory validation. 2012-04-11 16:00:18 -03:00
Alexandre Gaigalas
969aa8cf9a Ops, commited broken test 2012-04-08 22:46:30 -03:00
Alexandre Gaigalas
455ca0c8cf Fixed bug with additionalChars in alpha and its children 2012-04-08 22:44:35 -03:00
Alexandre Gaigalas
71f4af32a3 Fixed bug with allOf message template 2012-04-08 22:27:25 -03:00
Alexandre Gaigalas
78c0a9023a Merge branch 'develop' 2012-04-08 19:58:36 -03:00
Alexandre Gaigalas
c4495a61c8 Better readme and some tweak on Roman 2012-04-08 19:55:05 -03:00
Alexandre Gaigalas
926b67a0b7 New README on its way, some fixes 2012-04-08 19:08:39 -03:00
Alexandre Gaigalas
7d888f135f Tests and small fixes 2012-04-08 05:30:44 -03:00
Alexandre Gaigalas
731d47b7a3 Refactoring some validators to utf-8 and improving code readability 2012-04-07 21:37:37 -03:00
Alexandre Gaigalas
e27c931a75 Merge branch 'develop' of github.com:Respect/Validation into develop 2012-04-07 20:42:19 -03:00
Henrique Moody
8ec8dfb260 Create validator for versions. 2012-04-07 14:50:52 -03:00
Alexandre Gaigalas
cf3b4fc388 When rule for conditional validation 2012-04-05 22:03:41 -03:00
Alexandre Gaigalas
3b4f05b8eb Merging develop 2012-03-29 14:12:19 -03:00
Alexandre Gomes Gaigalas
11e291975e Merge pull request #69 from kleberhs007/consonant_validation
Insert validation, unit test and exception for consonants.
2012-03-28 09:38:14 -07:00
Kleber Hamada Sato
43a11cf9c5 Insert validation, unit test and exception for consonants.
Signed-off-by: Kleber Hamada Sato <kleberhs007@yahoo.com>
2012-03-27 15:26:52 -03:00
Alexandre Gomes Gaigalas
fee92ca6c5 Merge pull request #67 from kleberhs007/vowel_validation
Insert vowel validation, tests and exceptions.
2012-03-27 03:28:26 -07:00
Kleber Hamada Sato
30857349a2 Inserts vowel validation, tests and exceptions.
Signed-off-by: Kleber Hamada Sato <kleberhs007@yahoo.com>
2012-03-27 00:26:31 -03:00
Alexandre Gaigalas
87621e346f Removed incomplete filter/sanitize support 2012-03-22 23:07:17 -03:00
Alexandre Gaigalas
b364382f3d Fix #64 2012-03-22 22:12:07 -03:00
Alexandre Gaigalas
7ba352e905 Added test for #64 2012-03-22 21:55:27 -03:00
Alexandre Gaigalas
7148a09722 Added test for #64 2012-03-22 21:54:29 -03:00
Kleber Hamada Sato
21aa5bf0a0 Insert validation, tests and exception for perfect square numbers.
About perfect square numbers:
Perfect square numbers are numbers which is a product of some integer
with itself. A square root of a perfect square numbers is always a integer
number.

Signed-off-by: Kleber Hamada Sato <kleberhs007@yahoo.com>
2012-03-20 13:24:55 -03:00
Kleber Hamada Sato
0cd76d0346 Correct method from testInvalidFormattedCpf to testInvalidSlug, because
this method verifies a slug , not a CPF number.

Signed-off-by: Kleber Hamada Sato <kleberhs007@yahoo.com>
2012-03-19 13:58:39 -03:00
Kleber Hamada Sato
11ecf0b95e Change file PrimeNumberTest to PrimeNumberTest.php
Signed-off-by: Kleber Hamada Sato <kleberhs007@yahoo.com>
2012-03-14 16:37:51 -03:00
Kleber Hamada Sato
61d5e9b452 - Inserts copyright comments in PrimeNumberTest.
- Modifies the exception class name to PrimeNumberException and modifies
  the copyright current year to 2012.

Signed-off-by: Kleber Hamada Sato <kleberhs007@yahoo.com>
2012-03-13 23:51:48 -03:00
Kleber Hamada Sato
9777f22329 - Modifies PrimeNumber.php to accept zero value or a number under zero.
Returns: false

- Inserts PrimeNumberTest.php file with the Unit Test.

- Inserts PrimeNumberTest.php file with the exceptions validation.

Signed-off-by: Kleber Hamada Sato <kleberhs007@yahoo.com>
2012-03-13 23:46:24 -03:00
Torben Brodt
26af736f84 remove unused namespace use statements 2012-02-05 16:13:34 +01:00
Fábio da Silva Ribeiro
7a6020b25d Add MacAddress Validation with tests 2011-12-05 20:31:52 -02:00
Alexandre Gaigalas
abcff11611 Improved tests, new makefile 2011-11-29 19:20:07 -02:00
Alexandre Gaigalas
8bc2e0dca3 Zend Framework dependencies on Makefile 2011-11-25 15:28:12 -02:00
Jean Pimentel
b2015106ae Renamed RomanTest 2011-10-25 16:12:22 -02:00
Jean Pimentel
84d8fcdff4 Added Roman Numbers Validator 2011-10-25 16:06:43 -02:00
Alexandre Gomes Gaigalas
32de8bae81 Merge pull request #51 from jeanpimentel/creditcard
Added CreditCard Validator
2011-10-23 09:40:47 -07:00
Jean Pimentel
c4119fab82 Added CreditCard Validator 2011-10-23 12:37:14 -02:00
Jayson Reis
8fc2492181 geez, more missed tabs 2011-10-19 21:34:37 -02:00
Jayson Reis
a247eb2fc7 ported cnpj validator from js from hell 2011-10-19 20:46:51 -02:00
Jayson Reis
8d5fdeacd0 some changes in cnpj validators tests 2011-10-18 16:26:05 -02:00
Jayson Reis
13c9c7c759 started cnpj validator 2011-10-18 15:48:26 -02:00
Jayson Reis
edc2d77f3a rewrote of leap date validator so tests will not be fake anymore 2011-10-18 10:51:32 -02:00
Jayson Reis
82846a4347 improved LeapYear validator 2011-10-18 10:28:36 -02:00
Jayson Reis
475937e66e leap year test 2011-10-18 10:28:36 -02:00
Alexandre Gaigalas
f2bebc6342 Merge branch 'develop' of https://github.com/Respect/Validation into develop 2011-10-17 22:29:15 -02:00