Extract validator into a more modular constructor