CodeZettaInterview Hub

NestJS · Validation · Senior · Architecture

Scenario: validation passes but business rule fails later.

Short Interview Answer

Input validation is not domain invariants — enforce invariants in domain services and map to 422/409.

Detailed Explanation

Don't overload DTOs with all business rules. Keep boundaries clear.

Did you know this answer?