working on U4-5875 - Updated RequiredManifestValueValidator to automatically check for empty json strings if the value type is JSON. Updates the TagsPropertyEditor to check for empty json in it's required validator. Updated the tags JS to always update the model value so if there's a server side validation, it gets cleared on change.
This commit is contained in:
@@ -34,6 +34,9 @@ angular.module("umbraco")
|
||||
if (tagToAdd.length > 0) {
|
||||
if ($scope.currentTags.indexOf(tagToAdd) < 0) {
|
||||
$scope.currentTags.push(tagToAdd);
|
||||
//update the model value, this is required if there's a server validation error, it can
|
||||
// only then be cleared if the model changes
|
||||
$scope.model.value = $scope.currentTags;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +69,9 @@ angular.module("umbraco")
|
||||
var i = $scope.currentTags.indexOf(tag);
|
||||
if (i >= 0) {
|
||||
$scope.currentTags.splice(i, 1);
|
||||
//update the model value, this is required if there's a server validation error, it can
|
||||
// only then be cleared if the model changes
|
||||
$scope.model.value = $scope.currentTags;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user