Merge pull request #11360 from umbraco/v8/bugfix/11057-mandatory-image-not-validating-after-first-time-failure

Fixes 11057: Mandatory Image not validating after first time failure
This commit is contained in:
Nikolaj Geisle
2021-10-19 13:30:03 +02:00
committed by GitHub
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) {