Validate domainModel not vm.annotation
When saving an annotation to the server, the object that we actually send to the server is: 1. `domainModel`, after being updated by `updateDomainModel()`, in the case of creating a new annotation, or 2. The temporary local variable `updatedDomainModel` in the case of editing an existing annotation `vm.annotation` is never the object that gets sent to the server. So pass `domainModel` or `updatedDomainModel` to `validate()`, not `vm.annotation`.
Showing
Please register or sign in to comment