Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

New Post: Help getting validation failure field to display correct path

$
0
0
Hi

The problem is with ValueValidator. Because you've specified a WithName("Value"), then it will always use this in the property path.

AbstractValidator is designed to work on properties of an object, not on primitive types like strings. If you re-write your ValueValidator as in inheritor of PropertyValidator, then it should work as you expect.

Jeremy

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>