How to validate array combinations of Object Property values in AngularJs?
<p>This is My JSFiddle  <a href="http://jsfiddle.net/nhupL4gs/" rel="nofollow">http://jsfiddle.net/nhupL4gs/</a>
This is my code.</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function Ctrl($scope) {
  $scope.data=[];
  
  $scope.data=[{"label":"name","type":"string"},
         {"label":"email","type":"string"}];
  $scope.addFields = function () {
    var count=0;
    angular.forEach($scope.data,function(obj){
      if(count==2){
        return true;
      }
      var newObj = {'label':obj.label, 'type':obj.type}
      $scope.data.push(newObj);
      count=count+1;
    });
  };
  
  $scope.save=function(){
   console.log($scope.data);
  };
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div ng-app&gt;
  &lt;div ng-controller="Ctrl"&gt;
  &lt;input type="button" value="add" ng-click="addFields()"/&gt;
    &lt;div ng-repeat="eachItem in data"&gt;
      &lt;label&gt;{{eachItem.label}}&lt;/label&gt;
      &lt;input type="text" ng-model="eachItem.value" /&gt;
  &lt;/div&gt;
  &lt;div ng-repeat="eachItem in data"&gt;
    Value: {{eachItem.value}}
  &lt;/div&gt;
  &lt;input type="button" value="save" ng-click="save()"/&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>

<p>In the above code i have an array contains 2 objects. when i click save button without enter data show error message. Otherwise i click add button two more objects push to same array that is completed . After adding objects to array when i enter data in first object('name') then click save button show error(enter email).So must and should validate first two objects or other added objects data is mandatory.</p>