I have a form that is divided into tabs. Each tab is an ng-form that is a children of the main form element. The parent form should only be able to submit if the other subforms are valid. However, because I am using ng-switch, it only checks if the current tab is valid.
Here is the fiddle http://jsfiddle.net/nicolasmoise/LRfrY/2/
Is my approach correct? Should try an alternative to ng-switch or can I have all that logic inside the controller/services?
BONUS
When the parent forms submits, it should open the first tab/ng-form that isn't valid in order to immediately show the user the error. (e.g. if tab1 and tab2 are valid it will jump to tab3 and show the error there.