add modelValue validation for server to correctly update validation errors

This commit is contained in:
Mads Rasmussen
2021-10-12 11:52:01 +02:00
committed by Nikolaj Geisle
parent ca9dc94392
commit 49e1aec71c
2 changed files with 8 additions and 0 deletions

View File

@@ -69,4 +69,8 @@
<span class="help-inline" ng-message="valServer" ng-bind-html="vm.propertyForm.maxCount.errorMsg"></span>
</div>
<ng-form name="vm.modelValueForm">
<input type="hidden" name="modelValue" ng-model="vm.model.value.length" ng-required="vm.model.validation.mandatory && vm.model.value.length === 0" />
</ng-form>
</div>

View File

@@ -137,6 +137,10 @@
if (vm.propertyForm) {
vm.propertyForm.$setDirty();
}
if (vm.modelValueForm) {
vm.modelValueForm.modelValue.$setDirty();
}
}
function addMediaAt(createIndex, $event) {