I’ve started the repository under my own username on github at this time:
What I’ve done at this time:
- I’m using the name zend-datavalidator, with the namespace
- I’ve modified the proposed interfaces and traits to use the
Traitsuffixes pending a decision on how these artifacts should be named; consistency with existing components is likely more important at this time than other concerns.
- I’ve added a
ValidatorChainimplementation, which relies on a
ResultAggregateimplementation to deliver the results. The chain only aggregates concrete validator instances, and executes them in the order in which they are attached (no container or priority awareness).
- I’ve provided a
Betweenvalidator implementation to demonstrate how validators might be written. It in turn extends an
AbstractValidatorimplementation; this only provides some basics around failure message codes/templates, as well as a mechanism for building a validation failure result based on one or more such templates.
I’ve not written documentation yet, pending review by interested parties; use the tests to get an idea of how the component works.
My feeling at this time is that validator chains should likely be built from concrete instances. Since both validators and chains are stateless, this means that the services can be safely shared; I would expect discrete factories based on the needs of your application and/or individual data sets.