-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Repro:
using System.ComponentModel.DataAnnotations;
using MiniValidation;
class Test {
[MinLength(3)]
public string ErrorCode { get; set; }
}
class Program
{
static void Main(string[] args)
{
MiniValidator.TryValidate(
new Test { ErrorCode = "12" },
out var errors);
foreach (var error in errors)
{
foreach (var errorMessage in error.Value)
{
Console.WriteLine($"Property: {error.Key}, Error: {errorMessage}");
}
}
}
}
Output:
Property: ErrorCode, Error: The field ErrorCode must be a string or array type with a minimum length of '3'.
Property: ErrorCode, Error: The field ErrorCode must be a string or array type with a minimum length of '3'.
The bug is reproduced with both .NET 8 and .NET 9.
MiniValidation version is 0.9.2
Metadata
Metadata
Assignees
Labels
No labels