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

New Post: Find duplicate items in Collection

$
0
0

Hi

FluentValidation is designed to validate the values of properties that have already been set on a particular object. In this case, you're validating the View, so checking whether the user is already in UserPersonalCollection isn't something that can be handled by your UserValidator, as this is outside of the UserView for which your validator is defined. The simplest thing to do would be not to use FluentValidation for this particular rule - just perform the check manually. 


Viewing all articles
Browse latest Browse all 1917

Trending Articles



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