I need to implement input validation throughout my winform app. There are many different forms where data can be entered and I would like to not go control by control by form and create isValid etc per item. How have others dealt with this?
I see that most related posts deal with Web Apps and/or mention Enterprise Library Validation Application Block. Now I admit I haven't thoroughly researched ELVAB but it seems like overkill for what I need. My current thought is to write a class library with the various requirements and pass it a control as a parameter. I already have a Library of RegEx functions for things like isValidZipCode and such so that may be a place for me to start.
What I would like to have is a Validate button that onClick cycles through all the controls on that Form Page and performs the needed validation. How can I accomplish this?