130
rated 0 times
[
135]
[
5]
/ answers: 1 / hits: 26615
/ 11 Years ago, thu, august 15, 2013, 12:00:00
Given a simple html form like this:
<form name=myForm action=#sent method=post ng-app>
<input name=userPreference1 type=text ng-model=shipment.userPreference />
<input name=userPreference1 type=text ng-model=shipment.userPreference />
<input name=userPreference1 type=text ng-model=shipment.userPreference />
... submit input and all the other code...
</form>
I need your help to know how to check on validation time, if at least one of the inputs is empty. The desired validation is the following. The user must complete at least one a preference.
Using jQuery this:
if ( $(input).val() == ) {
Works ok, but would like to figure out how to do the same thing using angular.
Thanks so much in advance,
Guillermo
More From » html