Commit graph

54 commits

Author SHA1 Message Date
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
deedd3dddc Possible fix for #74 2012-05-17 15:51:49 -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
7d888f135f Tests and small fixes 2012-04-08 05:30:44 -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
Alexandre Gaigalas
abcff11611 Improved tests, new makefile 2011-11-29 19:20:07 -02:00
Alexandre Gaigalas
88f0d82cce Improved several tests, fixed bug on Arr::check() that was calling methods on non-objects 2011-10-05 20:05:36 -03:00
Alexandre
734fb96121 Added assertions for samples 2011-10-05 00:03:35 -03:00
unknown
2fbdf14992 Change regexp validator for possible use modificators 2011-05-04 15:01:38 +04:00
Alexandre Gomes Gaigalas
63cc857801 Cleanup on Validator class (removed some old stuff that i don't even know how ended up there), fixed findMessages and findRelated quirks 2011-04-27 14:35:12 -03:00
Alexandre
3ed3114e58 Added AbstractRule->setTemplate to support custom template messages. 2011-04-17 12:29:48 -03:00
Alexandre
9b6da3e3e2 Better Rules\Not() implementation. Works on composite rules now. 2011-04-09 21:00:50 -03:00
Alexandre
cc278caffd Revert "Revert "Message modes for exceptions (in draft)""
This reverts commit 2041d4a33a.
2011-04-09 20:34:21 -03:00
Alexandre
2041d4a33a Revert "Message modes for exceptions (in draft)"
This reverts commit 6f0dd5c072.
2011-04-09 20:30:49 -03:00
Alexandre Gomes Gaigalas
6f0dd5c072 Message modes for exceptions (in draft) 2011-04-08 16:39:10 -03:00
Alexandre
191065bf4c Very early stage Internet Domain Name validators. New Contains and Tld (top-level domain) validators. NoWhitespace now validates for null values. 2011-02-20 21:53:21 -03:00
Alexandre
b12b81685e StartsWith and EndsWith validators 2011-02-20 15:54:11 -03:00
Alexandre
b13ef8f072 More compositing messages adjustments 2011-02-19 17:47:34 -02:00
Alexandre
45b4a4dfad Fixed composite exceptions 2011-02-18 23:07:14 -02:00
Alexandre
28603d74a3 Improved message compositing and iteration. Cleanup. 2011-02-18 01:08:46 -02:00
Alexandre
4e068bf204 -Messages are now imperative ("foo must be bar") instead of informative ("foo is not bar").
-Several improvements on the messaging system and error reporting, lots of refactored code.
-Validators can now be safely named $val->setName('My Field'), and that name will reflect on the validation message ("My Field must be bla bla bla" instead of "incorrect value" must be bla bla bla)
2011-02-08 20:10:58 -02:00
Alexandre
e46dc1d36c Hide exception messages on tests 2011-02-07 12:23:24 -02:00
Alexandre
822fd269f8 Better README, fixed bugs on AllOf and AlphaException 2011-02-07 12:22:30 -02:00
Alexandre
6c0573e171 New README, fixes on positive and negative validator messages 2011-02-06 20:51:50 -02:00
Alexandre
8098321bcd A lot of refactoring, tests on ValidationException, improvements on AllOf::validate 2011-02-06 20:21:15 -02:00
Alexandre
e252c404ba Some refactoring, new tests 2011-02-05 15:32:21 -02:00
Alexandre
99996267d9 ValidationException->findRelated can now be used to find child exceptions. It should be easy to report messages now. 2011-02-03 20:16:58 -02:00
Alexandre
35c4d5febe -ExceptionIterator now can be configured to skip composite redundant messages or iterate over them all
-Rules\Each improvements and new tests, now can validate array keys too. Better exception reports for it.
-A very abrangent test including several cases on ValidatorTest
2011-02-02 00:28:02 -02:00
Alexandre (@alganet)
5830711f5a Several Improvements:
-Simplified defaultTemplates on Exceptions
	-Exceptions now can be iterated and recursively iterated
	-Messages built by RecursiveTreeIterator (SPL), faster an simpler
	-attribute, key and composite exceptions message plays nicer (no redundant messages)
2011-01-30 22:17:06 -02:00
Alexandre Gomes Gaigalas
9a5536dd69 Several new validators (Int, In, Negative, Positive, String). Refactored Length to work with strings and arrays. Better tests for several validators. Updated README and PEAR package file. 2010-12-07 17:17:43 -02:00
Alexandre Gomes Gaigalas
71b510cd51 Equals validator for equality/identity. Tests for AbstractRelated 2010-12-07 10:02:57 -02:00
Alexandre Gomes Gaigalas
35aee77111 Refactored names for some validators 2010-12-05 23:17:12 -02:00
Alexandre Gomes Gaigalas
248fbdcf4f More stable Exceptions API 2010-12-03 19:36:46 -02:00
Alexandre Gomes Gaigalas
42999f796a Very unstable commit. Lot of changes to the exception model. 2010-12-02 19:04:10 -02:00
Alexandre Gomes Gaigalas
2408730f48 Changed the Exceptions to Match Rules names 2010-11-30 13:36:04 -02:00
Alexandre Gomes Gaigalas
234f74a058 Refactored one, all, most and none to oneOf, allOf, noneOf and mostOf 2010-11-09 01:35:19 -02:00
Alexandre Gomes Gaigalas
b403f67739 Small fix 2010-11-09 00:32:36 -02:00
Alexandre Gomes Gaigalas
1d1c5d4b4c Removed nasty eval'd code from tests 2010-10-18 06:40:44 -02:00
Alexandre Gomes Gaigalas
605b6b00fa Changed some methods to protected 2010-10-18 03:24:19 -02:00
Alexandre Gomes Gaigalas
ffb2e3cdb5 Readme 2010-09-27 18:44:56 -03:00
Alexandre Gomes Gaigalas
b43371315a Major refactoring. Removed a layer from the validator rules, now all of them have a single level. Simplified fluent interface (chains and static validators), improved folder organization. 2010-09-26 02:16:02 -03:00
Alexandre Gomes Gaigalas
0491cd885f Turned Fluent Interface into a composite validator by nature, added support for chained composite validations, small fix on String\NotEmpty validator 2010-09-25 01:48:49 -03:00
Alexandre Gomes Gaigalas
9bcdb56189 Refactored "validator" name to "rule" in many places, fluent interface improvements, validatior chaining for fluent interfaces and small fixes 2010-09-25 01:13:26 -03:00
Alexandre Gomes Gaigalas
d25f7220dc Fluent interface for Valitation\Validator, draft string validator, better tests, composite validation improvements 2010-09-24 21:28:03 -03:00
Alexandre Gomes Gaigalas
9aee2ea16d Name refactorings, interface for simple validator calls, date improvements 2010-09-24 00:32:00 -03:00