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