Skip to content

Commit 61fa0f6

Browse files
committed
Removed validation for negative values in conditional formatting priority, as negative values should be allowed.
1 parent 9c8e4e3 commit 61fa0f6

4 files changed

+0
-5
lines changed

src/EPPlus/ConditionalFormatting/ExcelConditionalFormattingColorScaleValue.cs

-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ internal ExcelConditionalFormattingColorScaleValue(
7272
namespaceManager,
7373
itemElementNode)
7474
{
75-
Require.Argument(priority).IsInRange(1, int.MaxValue, "priority");
7675
Require.Argument(address).IsNotNull("address");
7776
Require.Argument(worksheet).IsNotNull("worksheet");
7877

src/EPPlus/ConditionalFormatting/ExcelConditionalFormattingIconDatabarValue.cs

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ internal ExcelConditionalFormattingIconDataBarValue(
7070
itemElementNode,
7171
namespaceManager)
7272
{
73-
Require.Argument(priority).IsInRange(1, int.MaxValue, "priority");
74-
7573
// Check if the parent does not exists
7674
if (itemElementNode == null)
7775
{

src/EPPlus/ConditionalFormatting/ExcelConditionalFormattingRuleFactory.cs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public static ExcelConditionalFormattingRule Create(
3434
{
3535
Require.Argument(type);
3636
Require.Argument(address).IsNotNull("address");
37-
//Require.Argument(priority).IsInRange(0, int.MaxValue, "priority"); // Priority can be negative, so remove this check.
3837
Require.Argument(worksheet).IsNotNull("worksheet");
3938

4039
// According the conditional formatting rule type

src/EPPlus/ConditionalFormatting/Rules/ExcelConditionalFormattingRule.cs

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ internal ExcelConditionalFormattingRule(
6767
itemElementNode)
6868
{
6969
Require.Argument(address).IsNotNull("address");
70-
Require.Argument(priority).IsInRange(0, int.MaxValue, "priority");
7170
Require.Argument(worksheet).IsNotNull("worksheet");
7271

7372
_type = type;

0 commit comments

Comments
 (0)