In our form elements are created dynamically using ng-repeat. Storing form values in $scope.answers.[attribute name].
In the same way I want to apply validation on change as form submit. but unable to call validation on dynamic elements.
my html element (index.html)
<div ng-if="que.QuestionData._fieldType === 'text'" >
<text-control-dir data-que-obj="que.QuestionData" ></text-control-dir>
{{answers[que.QuestionData._attributeName]}}
<span ng-show="DTOstep1.answers[que.QuestionData._attributeName].$touched && DTOstep1.answers[que.QuestionData._attributeName].$invalid">The name is required.</span>
</div>
(controlDirectives.js) directive have html for form controls. Refer this plunker for full code. https://plnkr.co/edit/GA74YHNFxFb0ARg16Sjj?p=preview
ngFormdirective.