public IEnumerable <ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, ControllerContext context) { yield return(new ModelClientValidationRule { ErrorMessage = UmbracoHelper.GetDictionaryItem(_umbracoDictionaryKey), ValidationType = "required" }); }
public UmbracoRange(int minimum, int maximum, string umbracoDictionaryKey) : base(minimum, maximum) { this.ErrorMessage = UmbracoHelper.GetDictionaryItem(umbracoDictionaryKey); }
public UmbracoRegularExpression(string pattern, string umbracoDictionaryKey) : base(pattern) { this.ErrorMessage = UmbracoHelper.GetDictionaryItem(umbracoDictionaryKey); }
public UmbracoEmail(string umbracoDictionaryKey) : base(GetRegex()) { this.ErrorMessage = UmbracoHelper.GetDictionaryItem(umbracoDictionaryKey); }