I need to be able to temporarily persist data that isn\'t fully validated yet, then enforce validation when I\'m ready to make it permanent. But Angular is preventing that.
The following solution can be used since Angular version 1.3:
You can set ng-model-options="{ allowInvalid: true }"
in the input field of the model where you want to persist invalid attributes.
allowInvalid: boolean value which indicates that the model can be set with values that did not validate correctly instead of the default behavior of setting the model to undefined
https://docs.angularjs.org/api/ng/directive/ngModelOptions
Then, when you are ready to show the user their validation errors, you are free to do it your way. Just remember to give your inputs and forms name
attributes, so that you can reference them in your scope.
E.g. if($scope.myFormName.my_input_name.$invalid) { ... }
A relevant tutorial: http://blog.thoughtram.io/angularjs/2014/10/19/exploring-angular-1.3-ng-model-options.html