Is it best practice to put data validation annotations in the Model or View Model? What are the advantages/disadvantages of one approach over the other?
Curious to see w
If you follow single responsibility then it should probably go into it's own component. That being said, if you want to make a short cut it's okay to but it in the ViewModel. It definitely shouldn't go in the model though. Your model should be "pure" data. No business rules and validation is business rules.