I am currently facing an issue with angular js dropdown validation. I have been trying to implement dropdown validation using the code from this website: https://github.com/turinggroup/angular-validator
However, upon checking the demo provided in this link: Demo, it seems that there is no specific information regarding how to validate a Dropdown control. If anyone has successfully implemented dropdown validation using the same code, I would greatly appreciate some guidance.
I have created a Plunker demonstrating my dropdown control:
Below is the code for my dropdown:
<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' };
I am looking to display validation if the user does not select any option from the dropdown, similar to how validation appears for a textbox control. Your assistance on this matter would be highly appreciated.