Given this code:
Header inputs:
for (control of $scope.[form name].$$controls) { control.$setDirty(); control.$validate(); }
You can try the above codes. Make it running before submit.