Set validation.min with required as well like below one.
supplierId: ["", [Validators.required, Validators.min(1)]]
supplierId is always greater zero so min(1) works for you.
EmployeeStatusChangeRoutingInput: {
Action: 'value3'
}
ng-options="option.Name as option.Value for option in Data.Actions"
angular.module('myApp', [])
.controller('myCtrl', ['$scope', function($scope) {
$scope.Data = {
Actions: [{
Value: 'test1',
Name: 'value1'
}, {
Value: 'test2',
Name: 'value2'
}, {
Value: 'test3',
Name: 'value3'
}],
EmployeeStatusChangeRoutingInput: {
Action: 'value3'
}
}
}])
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<div class="dropdownIcon">
<select name="actions" id="actions" ng-options="option.Name as option.Value for option in Data.Actions" ng-focus="ActionsLabel = true" ng-blur="ActionsLabel = false;" ng-model="Data.EmployeeStatusChangeRoutingInput.Action"></select>
</div>
</div>
$http.post('commandCenter.aspx/allCustomer', {}).then(
function onSuccess(response) {
$scope.customers = JSON.parse(response.data.d);
if ($scope.customers.length === 1) {
$scope.relatedTo = $scope.customers[0].CUSTCODE;
}
console.log($scope.customers); },
function onError(response) {
console.log('error !!! ');
});