Пример #1
0
 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);
 }