title: Angular JS create multiple Dropdowns dynamically and Need validation
body: <p>I want to do validation for the dynamically create dropdown fields in angular js.
  Here I pasred my JSON data and dynamically create dropdown fields and able to get even data but I want validation on default option "select a type".
  .html file</p>
  
  <pre><code>  &lt;div ng-repeat="CategoryList1 in Data"&gt;
    {{CategoryList1.fullImage}}
    &lt;div ng-repeat="Attributes in CategoryList1.Attributes"&gt;
      &lt;label class="item item-input"&gt;
        &lt;span&gt;  {{Attributes.name}}&lt;/span&gt;
      &lt;/label&gt;
      &lt;select ng-model="atcStatusTasks" name="category-group" id="name" required
       ng-options="values.values for values in Attributes.Values" ng-change="atcStatusTasks===undefined ||GetValue(atcStatusTasks,Attributes.name)" &gt;
         &lt;option selected="selected" value=""&gt;select a type&lt;/option&gt;
     &lt;/select&gt;
     {{atcStatusTasks}}{{Attributes.name}}
    &lt;/div&gt;
      &lt;button class="button button-dark" ng-click="addToCart()"&gt; Add To Cart&lt;/button&gt;
      &lt;span style="color:red"&gt;{{msg}}&lt;/span&gt;&lt;br /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/986lC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/986lC.png" alt="enter image description here"></a></p>
  
  <p>JSON data:</p>
  
  <pre><code>{
      "recordSetTotal": "1",
      "resourceId": "",
      "resourceName": "productview",
      "recordSetComplete": "true",
      "recordSetStartNumber": "0",
      "CatalogEntryView": [
          {
              "shortDescription": "Straight leg denim jeans",
              "buyable": "true",
              "longDescription": "A regular pair of jeans for your boy in dark blue, they are straight legged and have a distressed finish. Whisker washed for a faded effect, the comfortable fit makes him look tall and lean. A white shirt goes very well with these jeans.",
              "parentCategoryID": "10024",
              "metaKeyword": " Hermitage Collection",
              "resourceId": "",
              "Price": [
                  {
                      "priceDescription": "I",
                      "priceUsage": "Offer",
                      "priceValue": "45.0"
                  }
              ],
              "productType": "ProductBean",
              "name": "Hermitage Straight Leg Denim Jeans",
              "fullImage": "",
              "thumbnail": "",
              "uniqueID": "12390",
              "manufacturer": "Hermitage Collection",
              "numberOfSKUs": "4",
              "SKUs": [
              {
                  "Attributes": [
                      {
                          "usage": "Defining",
                          "Values": [
                              {
                                  "values": "Blue",
                                  "identifier": "Blue",
                                  "uniqueID": "7000000000000001341"
                              }
                          ],
                          "searchable": "false",
                          "identifier": "BoysPantsColor",
                          "comparable": "true",
                          "name": "Color",
                          "displayable": "true",
                          "uniqueID": "7000000000000000060"
                      }, 
                      {
                          "usage": "Defining",
                          "Values": [
                              {
                                  "values": "S",
                                  "identifier": "S",
                                  "uniqueID": "7000000000000001344"
                              }
                          ],
                          "searchable": "false",
                          "identifier": "BoysPantsSize",
                          "comparable": "true",
                          "name": "Size",
                          "displayable": "true",
                          "uniqueID": "7000000000000000061"
                      }
                  ],
                  "SKUUniqueID": "12391",
                  "Price": [
                      {
                          "SKUPriceDescription": "I",
                          "SKUPriceValue": "45.0",
                          "SKUPriceUsage": "Offer"
                      }
                  ]
              }, 
              {
                  "Attributes": [
                      {
                          "usage": "Defining",
                          "Values": [
                              {
                                  "values": "Blue",
                                  "identifier": "Blue",
                                  "uniqueID": "7000000000000001341"
                              }
                          ],
                          "searchable": "false",
                          "identifier": "BoysPantsColor",
                          "comparable": "true",
                          "name": "Color",
                          "displayable": "true",
                          "uniqueID": "7000000000000000060"
                      }, 
                      {
                          "usage": "Defining",
                          "Values": [
                              {
                                  "values": "M",
                                  "identifier": "M",
                                  "uniqueID": "7000000000000001345"
                              }
                          ],
                          "searchable": "false",
                          "identifier": "BoysPantsSize",
                          "comparable": "true",
                          "name": "Size",
                          "displayable": "true",
                          "uniqueID": "7000000000000000061"
                      }
                  ],
                  "SKUUniqueID": "12392",
                  "Price": [
                      {
                          "SKUPriceDescription": "I",
                          "SKUPriceValue": "45.0",
                          "SKUPriceUsage": "Offer"
                      }
                  ]
              }, 
              {
                  "Attributes": [
                      {
                          "usage": "Defining",
                          "Values": [
                              {
                                  "values": "Blue",
                                  "identifier": "Blue",
                                  "uniqueID": "7000000000000001341"
                              }
                          ],
                          "searchable": "false",
                          "identifier": "BoysPantsColor",
                          "comparable": "true",
                          "name": "Color",
                          "displayable": "true",
                          "uniqueID": "7000000000000000060"
                      }, 
                      {
                          "usage": "Defining",
                          "Values": [
                              {
                                  "values": "L",
                                  "identifier": "L",
                                  "uniqueID": "7000000000000001346"
                              }
                          ],
                          "searchable": "false",
                          "identifier": "BoysPantsSize",
                          "comparable": "true",
                          "name": "Size",
                          "displayable": "true",
                          "uniqueID": "7000000000000000061"
                      }
                  ],
                  "SKUUniqueID": "12393",
                  "Price": [
                      {
                          "SKUPriceDescription": "I",
                          "SKUPriceValue": "45.0",
                          "SKUPriceUsage": "Offer"
                      }
                  ]
              }, 
              {
                  "Attributes": [
                      {
                          "usage": "Defining",
                          "Values": [
                              {
                                  "values": "Blue",
                                  "identifier": "Blue",
                                  "uniqueID": "7000000000000001341"
                              }
                          ],
                          "searchable": "false",
                          "identifier": "BoysPantsColor",
                          "comparable": "true",
                          "name": "Color",
                          "displayable": "true",
                          "uniqueID": "7000000000000000060"
                      }, 
                      {
                          "usage": "Defining",
                          "Values": [
                              {
                                  "values": "XL",
                                  "identifier": "XL",
                                  "uniqueID": "7000000000000001347"
                              }   
                          ],
                          "searchable": "false",
                          "identifier": "BoysPantsSize",
                          "comparable": "true",
                          "name": "Size",
                          "displayable": "true",
                          "uniqueID": "7000000000000000061"
                      }
                  ],
                  "SKUUniqueID": "12394",
                  "Price": [
                      {
                          "SKUPriceDescription": "I",
                          "SKUPriceValue": "45.0",
                          "SKUPriceUsage": "Offer"
                      }
                  ]
              }],
              "Attributes": [
                  {
                      "usage": "Defining",
                      "Values": [
                          {
                              "values": "S",
                              "extendedValue": [
                                  {
                                      "value": "C62",
                                      "key": "UnitOfMeasure"
                                  }
                              ],
                              "identifier": "S",
                              "uniqueID": "7000000000000001344"
                          }, 
                          {
                              "values": "M",
                              "extendedValue": [
                                  {
                                      "value": "C62",
                                      "key": "UnitOfMeasure"
                                  }
                              ],
                              "identifier": "M",
                              "uniqueID": "7000000000000001345"
                          }, 
                          {
                              "values": "L",
                              "extendedValue": [
                                  {
                                      "value": "C62",
                                      "key": "UnitOfMeasure"
                                  }
                              ],
                              "identifier": "L",
                              "uniqueID": "7000000000000001346"
                          }, 
                          {
                              "values": "XL",
                              "extendedValue": [
                                  {
                                      "value": "C62",
                                      "key": "UnitOfMeasure"
                                  }
                              ],
                              "identifier": "XL",
                              "uniqueID": "7000000000000001347"
                          }
                      ],
                      "searchable": "false",
                      "dataType": "STRING",
                      "ExtendedValue": [
                          {
                              "extValue": "C62"
                          }
                      ],
                      "identifier": "BoysPantsSize",
                      "comparable": "true",
                      "name": "Size",
                      "description": "Size",
                      "displayable": "true",
                      "uniqueID": "7000000000000000061"
                  }, 
                  {
                      "usage": "Defining",
                      "Values": [
                          {
                              "values": "Blue",
                              "extendedValue": [{
                                  "value": "C62",
                                  "key": "UnitOfMeasure"
                              }],
                              "identifier": "Blue",
                              "uniqueID": "7000000000000001341"
                          }
                      ],
                      "searchable": "false",
                      "dataType": "STRING",
                      "ExtendedValue": [
                          {
                              "extValue": "C62"
                          }
                      ],
                      "identifier": "BoysPantsColor",
                      "comparable": "true",
                      "name": "Color",
                      "description": "Color",
                      "displayable": "true",
                      "uniqueID": "7000000000000000060"
                  }, 
                  {
                      "usage": "Descriptive",
                      "Values": [
                          {
                              "values": "Denim jeans",
                              "identifier": "BCL015_1501",
                              "uniqueID": "7000000000000001368"
                          }
                      ],
                      "searchable": "false",
                      "dataType": "STRING",
                      "ExtendedValue": [
                          {
                              "extValue": "C62"
                          }
                      ],
                      "identifier": "Style",
                      "comparable": "true",
                      "name": "Style",
                      "description": "Style",
                      "displayable": "true",
                      "uniqueID": "7000000000000000010"
                  }, 
                  {
                      "usage": "Descriptive",
                      "Values": [
                          {
                              "values": "Denim",
                              "identifier": "BCL015_1501",
                              "uniqueID": "7000000000000001358"
                          }
                      ],
                      "searchable": "false",
                      "dataType": "STRING",
                      "ExtendedValue": [
                          {
                              "extValue": "C62"
                          }
                      ],
                      "identifier": "Material",
                      "comparable": "true",
                      "name": "Material",
                      "description": "Material",
                      "displayable": "true",
                      "uniqueID": "7000000000000000009"
                  }, 
                  {
                      "usage": "Descriptive",
                      "Values": [
                          {
                              "values": "Casual",
                              "identifier": "BCL015_1501",
                              "uniqueID": "7000000000000001378"
                          }
                      ],
                      "searchable": "false",
                      "dataType": "STRING",
                      "ExtendedValue": [
                          {
                              "extValue": "C62"
                          }
                      ],
                      "identifier": "Occasion",
                      "comparable": "true",
                      "name": "Occasion",
                      "description": "Occasion",
                      "displayable": "true",
                      "uniqueID": "7000000000000000011"
                  }, 
                  {
                      "usage": "Descriptive",
                      "Values": [
                          {
                              "values": "8-16",
                              "identifier": "BCL015_1501",
                              "uniqueID": "7000000000000001348"
                          }
                      ],
                      "searchable": "false",
                      "dataType": "STRING",
                      "ExtendedValue": [
                          {
                              "extValue": "C62"
                          }
                      ],
                      "identifier": "Age",
                      "comparable": "true",
                      "name": "Age",
                      "description": "Age",
                      "displayable": "true",
                      "uniqueID": "7000000000000000053"
                  }
              ],
              "subscriptionType": "NONE",
              "metaDescription": "Straight leg denim jeans",
              "title": "Hermitage Straight Leg Denim Jeans | Aurora",
              "disallowRecOrder": "true",
              "hasSingleSKU": "false",
              "partNumber": "BCL015_1501",
              "storeID": "10001",
              "fullImageAltDescription": "Image for Hermitage Straight Leg Denim Jeans from Aurora"
          }
      ],
      "recordSetCount": "1",
      "MetaData": [
          {
              "metaKey": "price",
              "metaData": "1"
          }
      ]
  }
  </code></pre>