Extracting validation in to its own class