In order to simplify things I made up a sample form to describe my question:
<form novalidate name="form">
<input required name="foo" ng-model="my.foo">
</form>
And also a controller:
angular.module('sample', []).controller('MainController', function($scope) {
$scope.$watch('form.$valid', function (valid) {
console.log(valid);
});
});
Expected result:
> false
Actual result:
> true
> false
Can anybody tell me why at first the form is valid and then becomes invalid (what it is supposed to be, by the way)?