I have 4 media pickers, and only the first one is mandatory.
I can set my data type to "Mandatory" but this obviously doesn't validate because I have a complex object as my value.
As a test I tried setting my $scope.model.value to null to see what happened, and while I do get a validation error from the data type saying "Value cannot be null", the page still saves and publishes with the null value. I would've expected the Mandatory flag to prevent this.
Ideally I want to show an alert with the contents of my $scope.errors property and prevent the publishing of the content.
Custom Property Editor, complex model validation
How do you validate a complex object in a custom property editor? This is my formSubmitting...
I have 4 media pickers, and only the first one is mandatory.
I can set my data type to "Mandatory" but this obviously doesn't validate because I have a complex object as my value.
As a test I tried setting my $scope.model.value to null to see what happened, and while I do get a validation error from the data type saying "Value cannot be null", the page still saves and publishes with the null value. I would've expected the Mandatory flag to prevent this.
Ideally I want to show an alert with the contents of my $scope.errors property and prevent the publishing of the content.
is working on a reply...