Adding code to re-validate on value change
This commit is contained in:
@@ -182,6 +182,9 @@
|
||||
else {
|
||||
vm.onValueChanged({ value: [] });
|
||||
}
|
||||
|
||||
//this is required to re-validate
|
||||
$scope.propertyForm.tagCount.$setViewValue($scope.model.value.length);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,7 +192,7 @@
|
||||
*/
|
||||
function validateMandatory() {
|
||||
return {
|
||||
isValid: !vm.validation.mandatory || (vm.viewModel != null && vm.viewModel.length > 0) || (vm.value != null && vm.value.length > 0),
|
||||
isValid: !vm.validation.mandatory || (vm.viewModel != null && vm.viewModel.length > 0),
|
||||
errorMsg: "Value cannot be empty",
|
||||
errorKey: "required"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user