Skip to content

Commit ff1aee1

Browse files
committed
Add demo for select form
Validate within Directive with ng-form #60
1 parent d505d45 commit ff1aee1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ <h1>Angular Validation.
9696

9797
<label>Number</label>
9898
<input type="text" name="numberBlur" ng-model="form2.number" validator="number" valid-method="blur"/>
99+
100+
<label>Lucky Number</label>
101+
<select class="form-control" name="selectBlur" ng-model="form2.select" validator="required">
102+
<option>1</option>
103+
<option>2</option>
104+
<option>3</option>
105+
<option>4</option>
106+
<option>5</option>
107+
</select>
99108
</fieldset>
100109

101110
<ul class="button-group">
@@ -203,7 +212,7 @@ <h1>Angular Validation.
203212
<ul class="button-group">
204213
<li><button class="button" ng-click="form5.submit(Form5)">Submit</button></li>
205214
<li><button class="button alert" ng-click="form5.reset(Form5)">Reset</button></li>
206-
<li><button class="button secondary" ng-disabled="!form5.checkValid(Form5)">checkValid = {{ form2.checkValid(Form2) }}</button></li>
215+
<li><button class="button secondary" ng-disabled="!form5.checkValid(Form5)">checkValid = {{ form5.checkValid(Form5) }}</button></li>
207216
</ul>
208217
<!-- <pre>{{ form | json }}</pre> -->
209218
</form>

0 commit comments

Comments
 (0)