Applicative validation checks incoming API data before business logic uses it, transforming externally supplied values into properly justified domain values. Unlike a fail-fast handler, it can express independent checks as a calculation and accumulate their errors. section 14.2.4
The technique emphasizes:
- Separating the API model from the domain model. section 14.2.4
- Replacing nested or immediate failure checks with validation combinators. section 14.2.4
- Reporting multiple independent problems together instead of returning only the first error. section 14.2.4
Pointed nested validation
A validator checks an outer string and a nested integer with <$> and <*>, requiring the integer to be between 0 and 100. Applying it to Outer "" (Inner 0) produces both field-specific errors. section 14.2.4
Figure 14.10 API and domain types
Use the API-to-domain diagram to place validation at the boundary between external request values and justified domain data. section 14.2.4

