Now passing emit function to Validator.type