title: access angularjs form field that contains a number
body: <p>I have a list of form fields that are generated as the result of an <code>ng-repeat</code> . As such I use the {{$index}} of the repeat loop to name the fields, i.e. `  which leads to:</p>
  
  <pre><code>&lt;input name="myInput0"&gt;
  &lt;input name="myInput1"&gt;
  &lt;input name="myInput2"&gt;
  ...
  </code></pre>
  
  <p>etc. Now I'm trying to access the fields' <code>$valid</code> attribute from the form in the standard angularjs way i.e. <code>myForm.myInput{{$index}}.$valid</code> which resolves to e.g. <code>myForm.myInput0.$valid</code> which I understand won't work because it's accessing a variable and numbers won't be allowed.</p>
  
  <p>However I then tried to access it with <code>myForm['myInput{{$index}}'].$valid</code>, e.g. <code>myForm['myInput0'].$valid</code> which I thought might work but still doesn't. Is there any way possible to access the form field when it contains a numeral? (or other illegal char like a hyphen)?</p>
  
  <p>e: I'm using angularjs 1.2 which might explain why this isn't working. Does anyone know of a workaround for pre 1.3 angular?</p>