From 62f362ed1aed253e4a34178f1d454733a1bc7159 Mon Sep 17 00:00:00 2001 From: kolan72 Date: Tue, 20 May 2025 15:37:57 +0300 Subject: [PATCH] Fix 'Nuances Of Using The Library' README example. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 740693e..df868cb 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ if(!result2.IsValid) For `ExpressValidatorBuilder` methods (`AddFunc`, `AddProperty`, and `AddField`), the overridden property name (set via `FluentValidation`'s `OverridePropertyName` method in `With(Async)Validation`) takes precedence over the property name passed as a string or via `Expression` in `AddFunc`/`AddProperty`/`AddField`. For example, for the `ObjToValidate` object from the 'Quick Start' chapter, `result.Errors[0].PropertyName` will equal "percentSum" (the property name overridden in the validation rule): ```csharp -// result0.Errors[0].PropertyName == "percentSum" +// result.Errors[0].PropertyName == "percentSum" var result = new ExpressValidatorBuilder() .AddFunc(o => o.PercentValue1 + o.PercentValue2, "sum") .WithValidation((o) => o.InclusiveBetween(0, 100)