Closed bhattjeet closed 8 years ago
Hi,
You need to add a name
attribute both to the parent form
or ng-form
and to the element with the custom-select
directive. Then, use something like ng-class="{ 'has-error': formName.controlName.$invalid }"
.
This behavior is not related to the custom-select
itself but to the ng-model
directive in conjunction with the form
directive.
Hello All,
I need to apply
ng-invalid
when control value its not selected. But in that control by default setng-valid
attribute. if value is selected or not that control always setng-valid
attribute.<div id="BranchId" class="form-control" custom-select="ser.id as ser.text for ser in vm.manifestCreateDto.branchList | filter: $searchTerm" required ng-model="vm.manifestCreateDto.branchId"></div>
i need to display RED border when value its not selected. Like below image