Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.Web / ModelBinding / RangeAttributeAdapter.cs
1 namespace System.Web.ModelBinding {
2     using System.ComponentModel.DataAnnotations;
3
4     public sealed class RangeAttributeAdapter : DataAnnotationsModelValidator<RangeAttribute> {
5         public RangeAttributeAdapter(ModelMetadata metadata, ModelBindingExecutionContext context, RangeAttribute attribute)
6             : base(metadata, context, attribute) {
7         }
8
9 #if UNDEF
10         public override IEnumerable<ModelClientValidationRule> GetClientValidationRules() {
11             string errorMessage = ErrorMessage; // Per Dev10 Bug #923283, need to make sure ErrorMessage is called before Minimum/Maximum
12             return new[] { new ModelClientValidationRangeRule(errorMessage, Attribute.Minimum, Attribute.Maximum) };
13         }
14 #endif
15     }
16 }