Factory for a knockout validator.