add a :focus flag for tests
moving validation into its own module