MVC3 integrated, with some changes to make it compile on Mono and with Razor2
[mono.git] / mcs / class / System.Web.Mvc3 / Mvc / FieldValidationMetadata.cs
1 namespace System.Web.Mvc {
2     using System;
3     using System.Collections.Generic;
4     using System.Collections.ObjectModel;
5
6     public class FieldValidationMetadata {
7
8         private string _fieldName;
9         private readonly Collection<ModelClientValidationRule> _validationRules = new Collection<ModelClientValidationRule>();
10
11         public string FieldName {
12             get {
13                 return _fieldName ?? String.Empty;
14             }
15             set {
16                 _fieldName = value;
17             }
18         }
19
20         public bool ReplaceValidationMessageContents {
21             get;
22             set;
23         }
24
25         public string ValidationMessageId {
26             get;
27             set;
28         }
29
30         public ICollection<ModelClientValidationRule> ValidationRules {
31             get {
32                 return _validationRules;
33             }
34         }
35
36     }
37 }