Skip to content

Commit

Permalink
Merge pull request #11360 from umbraco/v8/bugfix/11057-mandatory-imag…
Browse files Browse the repository at this point in the history
…e-not-validating-after-first-time-failure

Fixes 11057: Mandatory Image not validating after first time failure

(cherry picked from commit 5cc70d2)
  • Loading branch information
Zeegaan authored and nul800sebastiaan committed Nov 3, 2021
1 parent 8acf7e1 commit da48f84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
if (vm.propertyForm) {
vm.propertyForm.$setDirty();
}

if (vm.modelValueForm) {
vm.modelValueForm.modelValue.$setDirty();
}
}

function addMediaAt(createIndex, $event) {
Expand Down

0 comments on commit da48f84

Please sign in to comment.