Hello Everyone
I am looking for a best-practise approach on how to do UI-validation in a model-view-presenter architecture.
I need to validate some forms with a lot of controls, and to make it easy for the user I store all errors or warnings with a reference to the control in a Log which is displayed to the user afterwards, so he can jump right away to the control he has to fix. This is done in the view-part, which is actually wrong since validation should take place in the presenter in order to exchange the view.
The problem for me of doing this validation in the presenter is that it is not just checking if provided values are wrong, it also needs to check if radiobuttons have been checked which enables a textbox, which then has to contain some text for example. I was thinking of using the BindingSource in the presenter since its reflecting the ui-changes and is visible to the presenter. But I am not sure if this is the right way to go (and I think its kind of uggly)?
By the way: the validation takes not just place before I write to the database, it already takes place while the user is working on the forms.
Could anyone think of a good way of doing this? Thanks in Advance