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

New Post: Clean up post and validating ViewModel to convert to Domain instance, how?

$
0
0

Hi Jeremy, thanks for the awser.

In my case, for sample, I have a property (Code property) that have to be unique for each product, like an ID. On my View, this field will the a textbox. I think it's a business validation, so, I would add it on my model (ProductValidation class). My viewmodel will validate only if the field is required (ProductViewModelValidation class).

I'd like to know, how would you do in this case? You add this kind of validation directly on the InputViewModel or not?

Thank you!


Viewing all articles
Browse latest Browse all 1917


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