Commit graph

1930 commits

Author SHA1 Message Date
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 03b2aca115 Fixed some interfaces 2010-12-23 18:15:54 -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 896fe166c8 Small improvements 2010-12-07 11:37:07 -02:00
Alexandre Gomes Gaigalas b3cc2285fc Less Reflection on Validator, better tests for AllOf 2010-12-07 10:11:14 -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 8f206ede7c StringLength refactoring (i'm very proud of this one!) 2010-12-06 19:20:13 -02:00
Alexandre Gomes Gaigalas 32c5fe4ce0 Refactoring on AbstractRelated, Call validator for validating inputs after passing them for a callback 2010-12-06 19:00:28 -02:00
Alexandre Gomes Gaigalas e38135ba78 Refactored AbstractVector into Each, improved Validator extensibility 2010-12-06 18:35:43 -02:00
Alexandre Gomes Gaigalas fa11c79339 Namespace use cleanup 2010-12-06 17:31:50 -02:00
Alexandre Gomes Gaigalas dc8a07c091 Improved interface Validatable 2010-12-06 17:05:36 -02:00
Alexandre Gomes Gaigalas 9a16edf053 Moved assert() to AbstractRule, improved extensibility for rules moving Exception creation to createException() 2010-12-06 17:02:21 -02:00
Alexandre Gomes Gaigalas 92d7c1e919 New Each validator. Removed Traversable and refactored Arr. Moved check() to AbstractRule, just the rules that need to overload it now implement it. 2010-12-06 16:30:56 -02:00
Alexandre Gomes Gaigalas 35aee77111 Refactored names for some validators 2010-12-05 23:17:12 -02:00
Alexandre Gomes Gaigalas f776bde6b8 Refactored HasKey, HasAttribute, HasOptionalKey and HasOptionalAttribute into AbstractRelated 2010-12-05 22:44:05 -02:00
Alexandre Gomes Gaigalas 0dceb11976 Refactoring on some validators. Still need refactoring on many of them 2010-12-05 18:26:04 -02:00
Alexandre Gomes Gaigalas 248fbdcf4f More stable Exceptions API 2010-12-03 19:36:46 -02:00
Alexandre Gomes Gaigalas 7c889b2d4b Changes on the Exception model 2010-12-02 22:23:02 -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 1c15766fcd Rules for Traversable items 2010-12-01 11:08:18 -02:00
Alexandre Gomes Gaigalas de3c73ab91 New rule for Traversable objects (arrays, arrayobjects, etc) 2010-11-30 17:53:22 -02:00
Alexandre Gomes Gaigalas 8ec90e00f1 Small fix. 2010-11-30 14:24:44 -02:00
Alexandre Gomes Gaigalas ae952fa073 Now HasAttribute works on private, protected and inacessible attributes. 2010-11-30 14:21:33 -02:00
Alexandre Gomes Gaigalas e6e5dd7cdb README update 2010-11-30 13:42:58 -02:00
Alexandre Gomes Gaigalas 945c9c6b33 PEAR package update 2010-11-30 13:37:39 -02:00
Alexandre Gomes Gaigalas 2408730f48 Changed the Exceptions to Match Rules names 2010-11-30 13:36:04 -02:00
Alexandre Gomes Gaigalas 460b744ee1 README update, deleted old files 2010-11-09 13:32:08 -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 f9b98679b2 Optional key and attribute validators 2010-11-08 23:56:28 -02:00
Alexandre Gomes Gaigalas 0d4e686a26 Rules for types: array, object, instances 2010-11-08 22:37:50 -02:00
Alexandre Gomes Gaigalas 1d7a721298 Faster validation for compositing rules, new check() method for validators 2010-10-18 07:15:44 -02:00
Alexandre Gomes Gaigalas 1d1c5d4b4c Removed nasty eval'd code from tests 2010-10-18 06:40:44 -02:00
Alexandre Gomes Gaigalas bc63da4e0e Major refactoring on the validation exceptions and messages. 2010-10-18 06:18:46 -02:00
Alexandre Gomes Gaigalas 87f88ae641 HasKey validator for arrays, tests improved on HasAttribute validator 2010-10-18 03:41:22 -02:00
Alexandre Gomes Gaigalas 605b6b00fa Changed some methods to protected 2010-10-18 03:24:19 -02:00
Alexandre Gomes Gaigalas 33c0d85ab9 Update on README 2010-10-18 03:11:21 -02:00
Alexandre Gomes Gaigalas f8639f488a Improvements on date validation and tests 2010-10-18 03:05:37 -02:00
Alexandre Gomes Gaigalas 611dbc1cd6 Parameter validation for Callback validator 2010-10-18 02:53:20 -02:00
Alexandre Gomes Gaigalas c29295a4d0 Better tests, parameter validation for Alnum and Alpha 2010-10-18 02:48:13 -02:00
Alexandre Gomes Gaigalas f18d700b9f New validators for numbers (digits, float, hexa, etc), alpha, regex, generic between, ip addresses. Improvements on several existent validators. 2010-10-18 02:26:02 -02:00
Alexandre Gomes Gaigalas d934d5c28e removed old file 2010-10-17 22:38:25 -02:00
Alexandre Gomes Gaigalas 91d10f6ba1 Removed the ghost explain() method 2010-10-16 20:44:21 -03:00
Alexandre Gomes Gaigalas 0d3487679b Fixed a nasty bug on StringLength validator identified by Augusto.
Merged the NumericBetween validator also created by Augusto.
Fixed a bug on the Zend and Sf tests that skipped tests inapropriately.
2010-10-16 20:40:04 -03:00
Augusto Pascutti b9a7e1efe1 Added NumericBetween and its tests. Made some more dataProviders for some tests. 2010-10-17 07:02:22 +08:00
Augusto Pascutti a34946a7e3 Changed SplClassLoader to work better with class_exists() and changed external lib tests to check for vendor classes first. 2010-10-17 07:02:28 +08:00
Alexandre Gomes Gaigalas cb8edeccf6 Refactored interface declarations 2010-10-06 19:21:01 -03:00