nickl-
bfa098fa0e
Fix documentation for Digit and Digits
2013-01-25 05:18:03 +02:00
nickl-
be04fa3264
Recreate Digits as deperecated decorator for Digit.
2013-01-25 05:18:03 +02:00
nickl-
898429ab07
Refactor rename Digits to Digit
2013-01-25 05:18:03 +02:00
nickl-
c3178c0d98
More whitespace only.
2013-01-25 05:18:02 +02:00
nickl-
d3d1ffc64b
Remove unused use statement
2013-01-25 05:18:02 +02:00
nickl-
cb5d578c69
Whitespace fixes only
2013-01-25 05:18:02 +02:00
nickl-
2839f49976
That shouldn't be there.
...
segfault test slipped into repo.
2013-01-25 05:18:02 +02:00
nickl-
d2dd27852d
Invalid test, it would appear.
...
This does not appear to be a valid test verifying an input string.
2013-01-25 05:18:02 +02:00
nickl-
6c5f7ff73d
Refactor class extraction AbstractFilterRule
2013-01-25 05:18:02 +02:00
nickl-
999f3f6c6a
Make AbstractCtypeRule abstract, implement ctypeFunction.
2013-01-25 05:18:02 +02:00
Andre Ramaciotti
d22c33c371
Made OneOfTest use Xdigits instead of Hexa
2013-01-25 05:18:01 +02:00
Andre Ramaciotti
43e1365356
Refactored AbstractCharGroup into AbstractRegexRule
...
It's now an actual abstract class.
2013-01-25 05:18:01 +02:00
Andre Ramaciotti
ba02149bf8
Removed unnecessary check in AbstractCharGroup
2013-01-25 05:18:01 +02:00
Andre Ramaciotti
6ade820b9b
Mark Hexa as deprecated
...
I've also changed its tests, setting an error handler that does
nothing. Maybe we should check if E_USER_DEPRECATED is really
being triggered, but I'm not sure on how to do it.
2013-01-25 05:18:01 +02:00
Andre Ramaciotti
ba9f012b0b
New Xdigit rule based on the previous Hexa rule
...
This is a really ugly copy'n'paste. There are two problems to
solve: how to make 'hexa' deprecated and how to make its use fall-
back to xdigits.
The simplest solution would be to put a if in Validator::buildRule,
but it's too hackish for my taste.
2013-01-25 05:18:01 +02:00
Andre Ramaciotti
272cff1d4c
Updated documentation
...
I've also marked hexa as deprecated and moved `countryCode` to
its alphabetical position.
2013-01-25 05:18:01 +02:00
Andre Ramaciotti
04c1ef6726
Removal of $acceptEmptyString
...
Notice that this changes the behaviour of some rules (of Digits in
special). That's why some lines from the tests appear in the diff,
they were removed from the invalid data provider and where put into
the valid data provider.
2013-01-25 05:18:01 +02:00
Andre Ramaciotti
0e9b7fb6f1
Removal of braces on single-line statements
...
I've only removed braces from the files I'd changed/created on my
last pull request. Notice, however, that there are other files
where this still happens.
2013-01-25 05:18:00 +02:00
Andre Ramaciotti
2af3ffeef2
Removed duplicated rule Xdigits (there is Hexa already)
2013-01-25 05:18:00 +02:00
Andre Ramaciotti
679ce35662
New rule Space based on ctype_space
2013-01-25 05:18:00 +02:00
Andre Ramaciotti
b8647dfa54
New rule Punctuation based on ctype_punct
2013-01-25 05:18:00 +02:00
Andre Ramaciotti
11b6cbd240
New rule 'Xdigit' based on ctype_xdigit
2013-01-25 05:18:00 +02:00
Andre Ramaciotti
86f7a6bc26
New rule Graphical based on ctype_graph
2013-01-25 05:18:00 +02:00
Andre Ramaciotti
a643f6f125
New rule 'Printable' based on ctype_print
...
More tests would be nice, but I've run out of ideas.
2013-01-25 05:18:00 +02:00
Andre Ramaciotti
82f86d96bf
Ctype rules now may accept or not the empty string
...
This will help wrapping some rules, as ctype_digit and ctype_cntrl
without breaking Alpha and Alnum.
2013-01-25 05:17:59 +02:00
Andre Ramaciotti
0a0c2116c5
Corrected method name
2013-01-25 05:17:59 +02:00
Andre Ramaciotti
aa01218401
New Rule 'Control' based on ctype_cntrl
...
As it is implemented, it accepts an empty string as valid. I'm
not sure if this should be the case, but changing this on the base
class breaks Alpha and Alnum.
2013-01-25 05:17:59 +02:00
Andre Ramaciotti
e40579ca43
Created new class for ctype_ based rules
2013-01-25 05:17:59 +02:00
Andre Ramaciotti
52824a9550
Corrected rules that stoped working after two last commits
...
Theorically, Digits should inherit from Alpha (as it shold use
ctype_digit). However, the regex being used isn't semantically
equal to ctype_digit.
2013-01-25 05:17:59 +02:00
Andre Ramaciotti
0ebd01d71a
Alpha refactoring to avoid code duplication
...
As a bonus, Alnum also uses a ctype_ function now.
2013-01-25 05:17:59 +02:00
Andre Ramaciotti
e11285a37a
Alpha now uses ctype_alpha
...
Replacing preg_match for ctype_alpha wasn't so straight forward as
they're not semantically equivalent (one considers spaces and line
breaks as valid characters and the other doesn't).
Also, I find that `|| $cleanInput === '';` at the end of validate
ugly, but it was necessary to make it accept empty strings.
2013-01-25 05:17:59 +02:00
Andre Ramaciotti
6704643b51
Small typo
2013-01-25 05:17:58 +02:00
Henrique Moody
5f9b1ee2fa
Merge pull request #106 from Respect/0.4.5
...
Fixed coding standards.
2013-01-14 14:58:46 -08:00
Henrique Moody
0421ba0cd3
Renamed test methods of underscore to cammelcase.
2013-01-14 20:56:53 -02:00
Henrique Moody
6c007df1d1
Fixed coding standards.
...
Coding standards must be follow PSR-1 and PSR-2.
2013-01-14 19:55:03 -02:00
Henrique Moody
80ed90d92c
Merge pull request #105 from lcobucci/develop
...
Fix for 32bit integer
2013-01-14 08:22:19 -08:00
Luís Otávio Cobucci Oblonczyk
3e7fd8d9e5
Typo fix
2013-01-14 14:11:51 -02:00
Luís Otávio Cobucci Oblonczyk
7014d5b74a
Method renamed
2013-01-14 14:08:38 -02:00
Luís Otávio Cobucci Oblonczyk
e08212ed17
Fix for 32bit integers
2013-01-14 12:35:04 -02:00
Henrique Moody
4a456aed06
Update .travis.yml
...
so one more try to make Travis-CI Work
2013-01-11 10:04:42 -02:00
Henrique Moody
4dbe3f0bf8
Update date of copyright on LICENSE file
2013-01-11 10:00:36 -02:00
Henrique Moody
6ad3736fdc
Update Travis-CI file.
...
Removed Respect\Foundation call and replaced by PHPUnit direct call.
This is another workaround to make Travis create build correctly.
2013-01-11 09:49:08 -02:00
Alexandre Gomes Gaigalas
3751aad0f9
Merge pull request #100 from lcobucci/develop
...
Implemented IP range validation (#95 )
2013-01-09 08:53:31 -08:00
Luís Otávio Cobucci Oblonczyk
5f93aa1040
Small message fix
2013-01-09 14:32:22 -02:00
Luís Otávio Cobucci Oblonczyk
b3d7c61ba7
Fix the exception message when the valitor has a network range
2013-01-09 14:29:39 -02:00
Luís Otávio Cobucci Oblonczyk
86f91ad978
Implemented IP range validation ( #95 )
2013-01-09 12:48:11 -02:00
Alexandre Gomes Gaigalas
8355f4bc9d
Merge pull request #94 from akhawaja/develop
...
Update PhpDoc header to help intellisense in IDEs like PhpStorm and Netbeans
2012-12-21 09:43:23 -08:00
Amir Khawaja
d981dccae9
Update PhpDoc header to help intellisense in IDEs like PhpStorm
...
and Netbeans.
2012-12-21 09:40:38 -08:00
Augusto Pascutti
2e6fe3a148
Fix Travis: make it use composer.
...
- Refactor Zend validator tests
- Fixed my email on composer.json
- Added dev packages in composer.json:
- Zend\Validator 2.*
- Symfony\Component\Valitor 2.*
PS: This is just a quick fix before Foundation can run this on his
own.
2012-12-18 01:55:33 -02:00
Alexandre Gomes Gaigalas
13ff74966d
Removing invalid authors from composer.json
2012-12-17 07:50:17 -02:00