I am doing angular js dropdown validation but getting problem when doing dropdown validation.
I have taken everything from this website and using this code: https://github.com/turinggroup/angular-validator
But in the above link there is nothing like doing validation on Dropdwon control.So if anybody have use this same code for doing dropdown validation and if successfull then please do guide me.
This is the plunker i have created which includes dropdown:
And this is my dropdown code:
<select class="form-control m-b-sm" required ng-model="form.Obj" ng-options="c.Name for c in Obj track by c.Id">
</select>
$scope.Obj = [
{Id : '0', Name : 'Select' },
{Id : '1', Name : 'USA' },
{Id : '2', Name : 'Canada' },
{Id : '3', Name : 'Russia' } ];
}
$scope.Obj = { Id: '0', name: 'Select' };
What i want that if user doesnt select any option from dropdown then validation should appear just like validation appears for textbox control.