Changes per NotNull PR comments
This commit is contained in:
parent
498d209949
commit
00b6e71e31
|
|
@ -19,15 +19,11 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation
|
||||||
string ruleName)
|
string ruleName)
|
||||||
: base(attribute)
|
: base(attribute)
|
||||||
{
|
{
|
||||||
if (ruleName == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(ruleName));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(ruleName))
|
if (string.IsNullOrEmpty(ruleName))
|
||||||
{
|
{
|
||||||
throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(ruleName));
|
throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(ruleName));
|
||||||
}
|
}
|
||||||
|
|
||||||
RuleName = ruleName;
|
RuleName = ruleName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
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
|
namespace Microsoft.AspNet.Mvc.ModelBinding.Validation
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue