imagine a component (wizard), where the first two steps (views) are static (view Step1 is followed by view Step2), but the third step is dynamic (dependant on input in view Step2, it will be view Step3a or view Step3b or ...).
The only common thing in all views Step3x are two input fields for dates (begin/end).
The question now is how to implement a validation method so that it works for all views Step3x, without copy/paste.
Within the component context, I have got a node "GenericStep3" with beginDate and endDate values. This is mapped to all view contexts of the views Step3x.
So my idea was to implement the validation methods within the main controller (component controller) and call these method(s) from the view controller. This works one time, then the application stops working.
Any pattern to be used for such thing? I think this is a very common task and there should be a general rule how to handle it?!
Thanks in advance