Make Multi URL Picker mandatory validation work clientside
This commit is contained in:
committed by
Sebastiaan Janssen
parent
5b949cef3c
commit
7507345c93
@@ -134,6 +134,12 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en
|
||||
.then(function (data) {
|
||||
vm.labels.general_recycleBin = data[0];
|
||||
});
|
||||
|
||||
// if the property is mandatory, set the minCount config to 1 (unless of course it is set to something already),
|
||||
// that way the minCount/maxCount validation handles the mandatory as well
|
||||
if ($scope.model.validation && $scope.model.validation.mandatory && !$scope.model.config.minNumber) {
|
||||
$scope.model.config.minNumber = 1;
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
Reference in New Issue
Block a user