diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs index 5386156b7d..f815135b29 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/DataTypeAttributeAdapter.cs @@ -19,15 +19,11 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation string ruleName) : base(attribute) { - if (ruleName == null) - { - throw new ArgumentNullException(nameof(ruleName)); - } - if (string.IsNullOrEmpty(ruleName)) { throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(ruleName)); } + RuleName = ruleName; } diff --git a/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs index b05e8d7047..8cb1c3f87f 100644 --- a/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.DataAnnotations/DefaultClientModelValidatorProvider.cs @@ -2,8 +2,6 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.AspNet.Mvc.ModelBinding.Validation {