Thanks to everyone who has helped get NetTiers to support the VAB.
Overview of the project
I have an generic entity class created from my database. This entity is used by several different WPF forms. I need to apply a 2nd level of validation to the entity in some instances.
For example if the entity is mapped to Form1 I need to add a regular expression to "PropertyX" - If the entity is mapped to Form2 then I need to apply a minimum length to "PropertyY"
All of the DB validation has been automatically added thanks to NetTiers so I need to keep that validation.
Where is the best place to add this validation? Form, Business Layer, Entity? - Just to complicate things I want the control to be validated in realime as they type which makes me think that the service layer is out? I did this validation in the past but the validation was done on the form in the textchanged event - not very slick.
As I have control of the form code I wondered if I could create the additional Validators in the form and add them to a collection in the entity. That way if there are additional validators I can add as required. Not to sure how it all works at the moment though.
I did an experiment where I created a validator method on the entity and called it from the WPF form and it worked but I know that is not best practice. This is not very expandible either.
Any advice for a someone keen to learn would be most appreciated.
Merry Christmas.
M1DST