Pointed-validation addresses a common API problem: validating every field while returning all errors in one response instead of stopping at the first failure. It records breadcrumbs to each error, including locations deep inside hierarchical data. section 14.2.4
Its design combines:
- Applicative-style composition, using fmap (<$>) and ap (<*>) to visit every field. section 14.2.4
- Composable validators, including condition for field rules and nested for hierarchical structures. section 14.2.4
- Structured errors containing both a message and a path of field breadcrumbs. section 14.2.4
Nested validation
For an Outer value containing an empty stringField and Inner intField equal to zero, validation can report both failures: one at ["stringField"] and another at ["innerField", "intField"].
