Issue #10. Introduce validator interface