Skip to content

Commit 4ebbb4b

Browse files
authored
Fix test for invariant culture parsing (#62631)
1 parent bf73e6e commit 4ebbb4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Validation/test/Microsoft.Extensions.Validation.GeneratorTests/ValidationsGenerator.Parsable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class ComplexTypeWithParsableProperties
4848
[Range(typeof(DateTime), "2023-01-01", "2025-12-31", ErrorMessage = "DateTime must be between 2023-01-01 and 2025-12-31")]
4949
public DateTime? DateTimeWithRange { get; set; } = DateTime.UtcNow;
5050
51-
[Range(typeof(decimal), "0.1", "100.5", ErrorMessage = "Amount must be between 0.1 and 100.5")]
51+
[Range(typeof(decimal), "0.1", "100.5", ErrorMessage = "Amount must be between 0.1 and 100.5", ParseLimitsInInvariantCulture = true)]
5252
public decimal? DecimalWithRange { get; set; } = 50.5m;
5353
5454
[Range(0, 12, ErrorMessage = "Hours must be between 0 and 12")]

0 commit comments

Comments
 (0)