[Forms] Let Angular force required rows

Pass along ng-required values such that Angular may
handle tracking of form validity based on the presence
of required fields. WTD-530.
This commit is contained in:
Victor Woeltjen 2014-11-26 13:20:07 -08:00
parent ede3e4f31e
commit d7c7e2835f
3 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,7 @@
<select class='form-control input select'
ng-model="ngModel[field]"
ng-options="o.name for o in options"
ng-required="ngRequired"
name="mctControl">
<option value="" ng-if="!ngModel[field]">- Select One -</option>
<span class='ui-symbol arw colorKey'>v</span>

View File

@ -1,6 +1,7 @@
<span class='form-control shell'>
<span class='field control'>
<input type="text"
ng-required="ngRequired"
ng-model="ngModel[field]"
name="mctControl">
</span>

View File

@ -50,6 +50,9 @@ define(
// Enabled/disabled state
ngDisabled: "=",
// Whether or not input is required
ngRequired: "=",
// Pattern (for input fields)
ngPattern: "=",