I have a form (made using divs) that gets displayed when i select an option using dropdown menu.
Am using ng-options for dropdown selections. My issue is I need to support IE8. I know IE8 does not support HTML5, and I can not use the 'required' tag
. Thus, I am trying to use the "ng-required"
option for form validation but it does not seem to work. I have looked at the jquery validator but I have many forms and each have different criteria. For example, I have a form which requires State/Country in input box which is required for a particular option. However, the same field is optional with the other option. To me, writing a validation for each is not the right approach since am trying to leverage angularjs.
Please help.
For example, one of the field is:
<div style="float:left; width:290px;margin-bottom: 8px;">
<div style="float:left; margin-right:8px; width: 113px; text-align: right;"> (*)Document Number: </div>
<div style="float:left; margin-right:8px;width: 160px;">
<input type="text" ng-model="customerData.docNmbr" placeholder=" Document Number" class="ng-pristine ng-valid" ng-required> </div>
</div>
and my submit button is:
<button type="submit" id="submitButton" ng-disabled="userForm.$invalid" class="btn btn-primary">Register</button>
require
out of the box and it works just fine. Out of curiosity how are you testing it in IE8? If you're running your app locally IE8 renders with IE7 standards by default. – Matt Aug 18 '14 at 19:29