public IEnumerable <ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, ControllerContext context) { ErrorMessage = UmbracoDictionary.GetDictionaryValue("MinLengthError"); yield return (new ModelClientValidationMinLengthRule(FormatErrorMessage(metadata.GetDisplayName()), Length)); }