The ng-switch
does not hide, it adds/removes elements, that match, to/from the DOM. This way the DOM does not have access to the removed fields so the validation cannot work for the hidden elements.
You could either handle the validation on the controller by checking if all your models have values, or you could just show/hide the elements instead of adding/removing them.
So, remove the ng-switch
and use ng-show="tab==1"
and ng-show="tab==2"
on the ng-form
elements.