Typo in DeniedValuesAttribute (#82665)
authorOndřej Kubíček <lordfanger@gmail.com>
Mon, 27 Feb 2023 14:37:28 +0000 (15:37 +0100)
committerGitHub <noreply@github.com>
Mon, 27 Feb 2023 14:37:28 +0000 (09:37 -0500)
* Typo in DeniedValuesAttribute

* PR feedback

src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/DeniedValuesAttribute.cs

index bfc9fc2..500a7ba 100644 (file)
@@ -43,9 +43,9 @@ namespace System.ComponentModel.DataAnnotations
         /// </remarks>
         public override bool IsValid(object? value)
         {
-            foreach (object? allowed in Values)
+            foreach (object? denied in Values)
             {
-                if (allowed is null ? value is null : allowed.Equals(value))
+                if (denied is null ? value is null : denied.Equals(value))
                 {
                     return false;
                 }