Reputation: 373
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>
Upvotes: 3
Views: 1603
Reputation: 20014
What you have to do is to use another library like modernizr. The main objective of this library is to standardize somehow old browser like IE8 with some of the new HTML5 Features. If you want to learn more about it this is a good article:
http://www.adobe.com/devnet/dreamweaver/articles/using-modernizr.html
Upvotes: 2