I’m using ASP.NET MVC2.
I love how I can annotate my model’s fields and check ModelState.IsValid.
The obvious reason to check it is when doing validation, but should you always check it in case new validation rules are applied to the model?
That way you don’t forget / need to check whether the controller checks IsValid.
Is there some reason not to do this check in all cases? Maybe just when the controller action has side-effects (DB-writing etc)?
You should do this check always else you end up persisting models that don’t have valid state.