|I was looking at this blog post about WPF Data Validations.
It lays out some basic methods:
This is nice because you can define model requirements on the model itself. HOW those requirements are enforced is done in whatever applications use those models.
In this case he invokes a service that does Server Side Validation. I can see this being useful for
things like checking for duplicates against a DB, bit not for simple UI validation like ensuring
required properties on a model are set.
But I can see uses for BOTH methods in an app. The annotations handle the simple, client side validation and the service handles more complex validation in the BL.
What I can't figure out is how to combine BOTH of these. I'd really like to have a generic assembly that I can re-use to handle validation.
Anyone know of a nice example?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.